You could implement a new op similar to clip, except the gradient would be 
1 everywhere.
An option to do that would be to use `OpFromGraph` and override the 
gradient.

On Saturday, July 22, 2017 at 7:42:06 PM UTC-4, Sihyeon Seong wrote:
>
>
> Hi, I found out T.clip(x, min, max) makes gradient zero when x is not in 
> [min, max]. 
>
> It would be useful if there is a function only clips value in the forward 
> pass, and calculate df/dx(x=max) at the backward-pass.
>
> Is the function I explained exist in Theano? Or, can somebody teach me how 
> to implement it? Thanks.
>

-- 

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