oneflow.exp

oneflow.exp()

This operator computes the exponential of Tensor.

The equation is:

\[out = e^x\]
Parameters

x (oneflow.Tensor) – A Tensor

Returns

The result Tensor

Return type

oneflow.Tensor

For example:

>>> import numpy as np
>>> import oneflow as flow

>>> x = flow.tensor(np.array([1, 2, 3]).astype(np.float32), dtype=flow.float32)
>>> y = flow.exp(x)
>>> y
tensor([ 2.7183,  7.3891, 20.0855], dtype=oneflow.float32)