Skip to content

Instantly share code, notes, and snippets.

@Bollegala
Last active August 29, 2015 14:13
Show Gist options
  • Save Bollegala/e346f97c042ac2fa1f03 to your computer and use it in GitHub Desktop.
Save Bollegala/e346f97c042ac2fa1f03 to your computer and use it in GitHub Desktop.
A brief memo of useful functions in theano
from theano import Tensor as T
# If you want to multiply two matrices (matrix product) in theano do the following
T.dot(X,Y)
# This will multiply matrix X (n,m) into the matrix Y(m,k) and produce a matrix (n,k)
# You can use this to compute inner-product between two row vectors as well
T.dot(w,x)
# will give the inner-product wx\T where w(n,) and x(n,)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment