Skip to content
fn

hard_sigmoid_op

→TensorImplPtr
int hard_sigmoid_op(const int & a)

Hard sigmoid y=clamp((x+3)/6,0,1)y = \mathrm{clamp}((x + 3)/6, 0, 1).

See Also

HardSigmoidBackward : Autograd node implementing the gradient rule.

Parameters

aTensorImplPtr
Input tensor.

Returns

TensorImplPtr

Output tensor with values in [0,1][0, 1].