Hello, I am new to python and theano.

I am trying to compute partial derivatives. Is there any way to specify that the gradient be taken with respect to a subset of the variables? I have in mind something along these lines (which is of course not working):

x = T.vector('x')

w = shared(np.random.randn(2))

y = T.dot(x,w)

dw0 = T.grad(y,w[0])

f = function([x], [y, dw0])

Thank you!

asked Mar 19 at 18:33

Hrag%20Gorune%20Ohannessian's gravatar image

Hrag Gorune Ohannessian
1111

Be the first one to answer this question!
toggle preview

powered by OSQA

User submitted content is under Creative Commons: Attribution - Share Alike; Other things copyright (C) 2010, MetaOptimize LLC.