mindspore.Tensor.exp
- Tensor.exp()[source]
Returns exponential of a tensor element-wise.
\[out_i = e^{x_i}\]- Returns
Tensor, has the same shape and dtype as the x.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> x = Tensor(np.array([1.0, 2.0, 4.0]), mindspore.float32) >>> output = x.exp() >>> print(output) [ 2.718282 7.389056 54.598152]