oneflow.log2¶
-
oneflow.
log2
(input) → Tensor¶ Returns a new tensor with the natural logarithm to the base 2 of the elements of
input
.\[y_{i} = \log2_{e} (x_{i})\]- Parameters
input (Tensor) – the input tensor.
For example:
>>> import oneflow as flow >>> import numpy as np >>> arr = np.random.randn(2, 3, 4, 5) >>> input = flow.tensor(arr, dtype=flow.float32) >>> output = flow.log2(input)