Please find a code example:
import theano as th
import theano.tensor as T
retval = th.ifelse.ifelse( T.gt(T.constant(2.0),T.constant(1.0)), T.ones((
500,1)),T.zeros((250,1)))
On Friday, 24 March 2017 17:33:59 UTC+1, Šarūnas S. wrote:
>
> I am using theano version 0.9.0.rc2.dev version.
>
>
>
> On Friday, 24 March 2017 17:32:33 UTC+1, Šarūnas S. wrote:
>>
>> In my graph I have a few IfElse nodes and I am wondering how and where
>> they are executed.
>>
>> At first I ran the code with linker=cvm in my THEANO_FLAGS but after
>> profiling it looked like the ifelse is being executed on the CPU. Then I
>> forced the linker=c to check whether the IfElse will go through and I got
>> the NotImplementedError: if{inplace, gpu} cannot produce C code. Btw
>> removing inline optimization did not help as it still gave the same error.
>>
>> So does IfElse have a GPU implementation? If yes how do I use it? Also,
>> does it do lazy evaluation or not?
>>
>
--
---
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.