mindchemistry.e3.nn.soft_unit_step

View Source On Gitee
mindchemistry.e3.nn.soft_unit_step(x)[source]

Smooth version of the unit step function.

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

x (Tensor) – the input tensor.

Returns

Tensor, the output of the unit step function.

Supported Platforms:

Ascend

Examples

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