Some helper methods for working with Theano for neural networks.
Quick visualisation method of numpy matrices in the terminal. See the blog post.
Miscellaneous helper functions for initialising weight matrices, vector softmax, etc.
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)
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()
: