pymc.math.clip#
- pymc.math.clip = Elemwise(scalar_op=clip,inplace_pattern=<frozendict {}>)[source]#
Clip x to be between min and max.
Note that when x is equal to the boundaries, the output is considered to be x, so at these points, the gradient of the cost wrt the output will be propagated to x, not to min nor max. In other words, on these points, the gradient wrt x will be equal to the gradient wrt the output, and the gradient wrt min and max will be zero.