mindscience.e3nn.nn.soft_unit_step

mindscience.e3nn.nn.soft_unit_step(x)[源代码]

单位阶跃函数的平滑版本。

\[x \mapsto \theta(x) e^{-1/x}\]
参数:
  • x (Tensor) - 输入张量。

返回:

Tensor,单位阶跃函数的输出。

样例:

>>> 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,)