This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
with open("bibliography.bib", "r", encoding="utf-8") as f: | |
lines = f.readlines() | |
entries = [] | |
current = [] | |
for line in lines: | |
if line.lstrip().startswith("@") and current: | |
entries.append("".join(current)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import theano | |
import theano.tensor as tensor | |
rng = np.random.RandomState(1) | |
srng = RandomStreams(rng.randint(1234)) | |
def get_one_hot(inp, nb_samples, nb_class): | |
m = tensor.zeros((nb_samples, nb_class)) | |
m = tensor.set_subtensor(m[tensor.arange(nb_samples), tensor.argmax(inp, -1)], 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Faster RCNN VGG Net | |
""" | |
The VGG network is adapted from: https://github.com/Lasagne/Recipes/blob/master/modelzoo/vgg16.py | |
""" | |
import theano | |
import theano.tensor as tensor | |
from lasagne.layers import InputLayer, DenseLayer, NonlinearityLayer, DropoutLayer | |
from lasagne.layers import Pool2DLayer as PoolLayer, RoIPoolLayer | |
from lasagne.layers import Conv2DLayer as ConvLayer, get_output, get_all_params | |
from lasagne.init import Normal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import theano | |
from theano import tensor as T | |
from theano.tensor.signal.pool import pool_2d | |
import numpy as np | |
def spp_pooling(data, out_dimension, data_shape): | |
input_size = data_shape[2:] | |
pooled_data_list = [] | |
for pool_dim in out_dimension: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import theano | |
import theano.tensor as T | |
import resource | |
def random_matrix_mult(): | |
mat1 = T.fmatrix('mat1') | |
mat2 = T.fmatrix('mat2') | |
col_index = np.arange(0, 150000, 5000) | |
row_index = np.arange(10000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alabaster==0.7.7 | |
appdirs==1.4.0 | |
appnope==0.1.0 | |
Babel==2.2.0 | |
backports-abc==0.4 | |
backports.ssl-match-hostname==3.5.0.1 | |
certifi==2015.11.20.1 | |
cv2==1.0 | |
cycler==0.10.0 | |
Cython==0.23.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CIFAR10_full_deploy" | |
# N.B. input image must be in CIFAR-10 format | |
# as described at http://www.cs.toronto.edu/~kriz/cifar.html | |
layer { | |
name: "data" | |
type: "Input" | |
top: "data" | |
input_param { shape: { dim: 1 dim: 3 dim: 32 dim: 32 } } | |
} | |
layer { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CaffeNet" | |
layer { | |
name: "data" | |
type: "Input" | |
top: "data" | |
input_param { shape: { dim: 10 dim: 3 dim: 227 dim: 227 } } | |
} | |
layer { | |
name: "conv1" | |
type: "Convolution" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import theano.tensor as T | |
import theano | |
from cgt.utils import Message | |
import time | |
import cgt | |
if __name__ == '__main__': | |
a = T.scalar(name='a', dtype='int64') # | |
b = T.scalar(name='b', dtype='int64') |
NewerOlder