theano_toolkit
theano_toolkit copied to clipboard
Collection of useful, re-used routines.
Helper methods for Theano
Some helper methods for working with Theano for neural networks.
hinton.py
Quick visualisation method of numpy matrices in the terminal. See the blog post.
utils.py
Miscellaneous helper functions for initialising weight matrices, vector softmax, etc.
parameters.py
Syntax sugar when declaring parameters.
import theano_toolkit.parameters as Parameters
P = Parameters()
P.W = np.zeros(10,10)
P.b = np.zeros(10)
# build model here.
params = P.values()
gradients = T.grad(cost,wrt=params)
Experimental
More syntax sugar for initialising parameters.
P = Parameters()
with P:
W = np.zeros(10,10)
b = np.zeros(10)
# use W and b to define model instead of P.W and P.b
params = P.values()
: