I have tried following code and it's result confuse me.

import theano
import theano.tensor as T
        
import theano
import theano.tensor as T
       
t = theano.shared(5,'t')
y = t ** 2
grad = T.grad(y, wrt = t)
f = theano.function([],y)
g = theano.function([],grad)
print(f())
print(g())

And i got 25 and 0.0 in return. However, the gradient must be 10. I think 
there's some detail in tensor grad that i dont know. Could you please 
explain to me what happened?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to