mindspore.ops.Expm1
- class mindspore.ops.Expm1[source]
Returns exponential then minus 1 of a tensor element-wise.
Refer to
mindspore.ops.expm1()
for more details.- Inputs:
x (Tensor) - The input tensor.
- Outputs:
Tensor, has the same shape and dtype as x.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> import numpy as np >>> from mindspore import Tensor, ops >>> x = Tensor(np.array([0.0, 2.0, 3.0, 5.0]), mindspore.float32) >>> expm1 = ops.Expm1() >>> output = expm1(x) >>> print(output) [ 0. 6.389056 19.085537 147.41316 ]