I tried many things but it doesn't work. I think there are some reshape
which interfere with the optimizations.
Maybe in the future you could add a T.protect() op. For now, I think I can
use OpFromGraph for that.
Anyway, I'm now focusing on a different algorithm which doesn't require
booleans at all so this is not a problem anymore for me.
On Tuesday, February 14, 2017 at 11:57:23 PM UTC+1, nouiz wrote:
>
> There is no easy way to disable opt on part of the graph.
>
> I think you can use x*(x<=a).astype('float32')
>
> The cast will get merged by Theano with the comparisons and as all inputs
> and outputs of that fused op are in float32, Theano should move that to the
> GPU.
>
> Fred
>
> Le sam. 11 févr. 2017 06:51, Kiuhnm Mnhuik <[email protected]
> <javascript:>> a écrit :
>
>> Is it possible to disable optimizations for a subgraph?
>> For instance, I need to compute (a - b) + b which Theano would
>> incorrectly simplify as a. I'm directly exploiting the characteristics of
>> float32 numbers.
>>
>> Basically, I'm doing boolean operations and comparisons directly in
>> float32 because I need to do all the computation on the GPU (GTX 970).
>> Whenever I use things like x * (x <= a) the data gets moved to the CPU.
>> And no, I can't use the new backend because it simply doesn't work on my
>> system.
>>
>> --
>>
>> ---
>> 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] <javascript:>.
>> 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.