I run the example code from theano tutorial 
http://deeplearning.net/software/theano/library/compile/opfromgraph.htm 
<http://deeplearning.net/software/theano/library/compile/opfromgraph.html>l

But it appears that theano.OpFromGraph does not take any effect...

from theano import function, OpFromGraph, tensor, gradx, y, z = 
tensor.scalars('xyz')e = x + y * zdef rescale_dy(inps, grads):
    x, y, z = inps
    g, = grads
    return z*2op = OpFromGraph(
    [x, y, z], [e], grad_overrides=['default', rescale_dy, 'default'])e2 = 
op(x, y, z)dx, dy, dz = grad(e2, [x, y, z])fn = function([x, y, z], [dx, dy, 
dz])

print fn(2.,3.,4.)

*My output is [1.,4.,3.] rather than [1.,8.,3.] as being shown in the 
tutorial.* Could anyone give an explain on that??

-- 

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