Le 17 sept. 2016 05:20, "GUKBEOM LEE" <tmw...@gmail.com> a écrit :
>
> I tried the code below for using theano.printing.Print()
> _________________________
>
> x_t = T.matrix('x_t')
> x2 = theano.tensor.matrix('x2')
>
> Print2d = theano.printing.Print('theano.printing.Print : ',
attrs=('shape') )(x2)
> print2dFunc = theano.function(inputs=[x2], outputs = Print2d)
>
> The code above is written after import  theano.
>
> and print2dFunc(x_t) is added when step function begins.

You should call print2dFunc with a numpy 2d tensor. Not a Theano variable.
After compiling a turbo function, you must use real days, not symbolic
variable.

Fred

>
> But, when compiling, error occurs
>
> TypeError: ('Bad input argument to theano function with name
"seq2seq2.py:29"  at index 0(0-based)', 'Expected an array-like object, but
found a Variable: maybe you are trying to call a function on a (possibly
shared) variable instead of a numeric array?')
>
> what should I do ?
>
> --
>
> ---
> 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 theano-users+unsubscr...@googlegroups.com.
> 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 theano-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to