Can you give the full stack trace and your grad() method? There is something strange. The Theano variable X seem malformed.
The problem could also be in your make node that build a bad output variable? Fred On Wed, Oct 26, 2016 at 5:47 PM, mrinmoy maity <[email protected]> wrote: > > I am trying experiment with a new Op in Theano. While defining the grad() > method, a function f(theano.tensor.tanh(x)) is used where x is the input. > However, internally its hitting an assert here: > > > File "~/anaconda/lib/python3.4/site-packages/theano/tensor/basic.py", > line 1198, in make_node > assert isinstance(t.type, TensorType) > > > The partial backtrace is given here: > > > File "~/anaconda/lib/python3.4/site-packages/theano/gof/op.py", line > 604, in __call__ > node = self.make_node(*inputs, **kwargs) > > File "~/anaconda/lib/python3.4/site-packages/theano/tensor/elemwise.py", > line 586, in make_node > DimShuffle, *inputs) > > File "~/anaconda/lib/python3.4/site-packages/theano/tensor/elemwise.py", > line 528, in get_output_info > for i in inputs]) > > File "~/anaconda/lib/python3.4/site-packages/theano/tensor/basic.py", > line 1198, in make_node > assert isinstance(t.type, TensorType) > > AssertionError > > > The t.type here is 'float64' instead of a Tensortype. The issue is easily > reproducible with using tanh inside grad(). > Note that I'm not using 'tanh' op here, rather using tanh in grad(). Also > encapsulating return from grad() using theano.tensor.as_tensor_variable() > doesn't work here. > > > Please let me know if there's a workaround for this. > > > Regards, > Mrinmoy > > > -- > > --- > 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. > -- --- 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.
