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
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
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
# 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 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
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)) |
OlderNewer