mindspore.ops.Exp
- class mindspore.ops.Exp(*args, **kwargs)[source]
Returns exponential of a tensor element-wise.
\[out_i = e^{x_i}\]- Inputs:
input_x (Tensor) - The input tensor.
- Outputs:
Tensor, has the same shape and dtype as the input_x.
- Raises
TypeError – If input_x is not a Tensor.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> input_x = Tensor(np.array([1.0, 2.0, 4.0]), mindspore.float32) >>> exp = ops.Exp() >>> output = exp(input_x) >>> print(output) [ 2.718282 7.389056 54.598152]