Thanks for the report. Which version of numpy do you use?

The problem seem related to your numpy version from the error message.

On Wed, Jan 24, 2018 at 5:05 AM <nicolas.grange...@gmail.com> wrote:

> Hi everyone,
>
> While using an OpFromGraph involving some operations with binary values,
> there is an optimization error:
>
> theano.gof.opt: ERROR: Optimization failure due to: local_add_canonizer
>> theano.gof.opt: ERROR: node:
>> Elemwise{add,no_inplace}(InplaceDimShuffle{0,1,x}.0,
>> InplaceDimShuffle{x,0,1}.0)
>> theano.gof.opt: ERROR: TRACEBACK:
>> theano.gof.opt: ERROR: Traceback (most recent call last):
>> File "/home/granger/dev/Theano/theano/gof/opt.py", line 2034, in
>> process_node
>> replacements = lopt.transform(node)
>> File "/home/granger/dev/Theano/theano/tensor/opt.py", line 4989, in
>> transform
>> num, denum = self.simplify(list(orig_num), list(orig_denum), out.type)
>> File "/home/granger/dev/Theano/theano/tensor/opt.py", line 4833, in
>> simplify
>> out_type=out_type)
>> File "/home/granger/dev/Theano/theano/tensor/opt.py", line 4919, in
>> simplify_constants
>> out_type=out_type)
>> File "/home/granger/dev/Theano/theano/tensor/opt.py", line 6328, in
>> add_calculate
>> v = reduce(np.add, num, zero) - reduce(np.add, denum, zero)
>> TypeError: numpy boolean subtract, the `-` operator, is deprecated, use
>> the bitwise_xor, the `^` operator, or the logical_xor function instead.
>
>
> This error does not happen when running on CPU backend.
> I suspect it might be due to the use of binary values in my code, but the
> log message is not very helpful, is there any way to get some more
> information to track down the error? Note that the fast_compile optimizer
> does not trigger the error, only the fast_run one.
>
> A demo code and the complete output is available here:
> https://gist.github.com/nlgranger/279bda7fff356cfe3f40ad6397d0ba04
>
> Best,
> Nicolas
>
> --
>
> ---
> 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