|
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! |