oneflow.log1p

oneflow.log1p()

Returns a new tensor with the natural logarithm of (1 + input).

\[\text{out}_{i}=\log_e(1+\text{input}_{i})\]

For example:

>>> import oneflow as flow
>>> import numpy as np
>>> x = flow.tensor(np.array([1.3, 1.5, 2.7]), dtype=flow.float32)
>>> out = flow.log1p(x)
>>> out
tensor([0.8329, 0.9163, 1.3083], dtype=oneflow.float32)