mindspore.ops.Exp
- class mindspore.ops.Exp[source]
Returns exponential of a tensor element-wise.
Refer to
mindspore.ops.exp()
for more details.- Inputs:
x (Tensor) - The input tensor.
- Outputs:
Tensor, has the same shape and dtype as the x.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> import numpy as np >>> from mindspore import Tensor, ops >>> x = Tensor(np.array([0.0, 1.0, 3.0]), mindspore.float32) >>> exp = ops.Exp() >>> output = exp(x) >>> print(output) [ 1. 2.718282 20.085537]