stray-leone / theano_toolkit

Collection of useful, re-used routines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Helper methods for Theano

Some helper methods for working with Theano for neural networks.

hinton.py

Hinton Diagrams 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()
:

About

Collection of useful, re-used routines.


Languages

Language:Python 100.0%