softsign#

ivy.softsign(x, /, out=None)[source]#

Apply the softsign function element-wise.

Parameters:
  • x (Union[Array, NativeArray]) – Input array.

  • out (Optional[Array], default: None) – optional output array, for writing the result to. It must have a shape that the inputs broadcast to.

Return type:

Array

Returns:

ret – The input array with softsign applied element-wise.

Examples

With ivy.Array input: >>> x = ivy.array([1.0, 2.0, 3.0]) >>> y = ivy.softsign(x) >>> print(y) ivy.array([0.5, 0.66666667, 0.75])