With the new gpu back-end, it will run on CPU and GPU for sure.

For the old one, it will probably, but some details could make it not
always run on GPU.

Fred

On Thu, Oct 1, 2015 at 5:33 AM Daniel Renshaw <[email protected]> wrote:

> Is this what you want:
>
> import theano.tensor as tt
>
> def threshold_activation(x):
>     return tt.switch(tt.lt(x, 0), 0, 1)
>
> This does an element-wise threshold activation of the elements of the
> tensor x.
>
> Daniel
>
>
> On 1 October 2015 at 05:28, Sahil <[email protected]> wrote:
>
>
> Does theano have a threshold activation function(hard limiter)?
> Output of threshold activation function is:
>
>  y=f(u)=0   if u<0
>             1   if u>=1
>
> --
>
> ---
> 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.
>

-- 

--- 
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.

Reply via email to