提交 7ef9e747 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Update documentation for gradient of `clip`

上级 ba5f2a3a
......@@ -2990,11 +2990,16 @@ def pow(a, b):
# see decorator for function body
# The numpy.clip don't work correctly when
# the min is bigger then the max
@_scal_elemwise # _with_nfunc('clip', 3, 1)
# The numpy.clip don't work correctly when the min is bigger then the max,
# So we do not use @scal_elemwise_with_nfunc('clip', 3, 1)
@_scal_elemwise
def clip(x, min, max):
"""clip x to be between min and max"""
"""clip x to be between min and max.
:note: When `x` is equal to the boundaries, the output is considered
to be `x`, so at these points, the gradient will flow through `x`,
not through `min` nor `max`.
"""
# see decorator for function body
# for grep: clamp, bound
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论