mindscience.e3nn.nn.soft_unit_step

mindscience.e3nn.nn.soft_unit_step(x)[source]

Smooth version of the unit step function.

\[x \mapsto \theta(x) e^{-1/x}\]
Parameters

x (Tensor) – Input tensor.

Returns

Tensor, the output of the unit step function.

Examples

>>> from mindscience.e3nn.nn import soft_unit_step
>>> from mindspore import ops, Tensor
>>> x = Tensor(ops.linspace(-1.0, 10.0, 1000))
>>> outputs = soft_unit_step(x)
>>> print(outputs.shape)
(1000,)