oneflow.nn.Identity¶
-
class
oneflow.nn.
Identity
(*args, **kwargs)¶ A placeholder identity operator that is argument-insensitive.
- Parameters
args – any argument (unused)
kwargs – any keyword argument (unused)
For example:
import numpy as np import oneflow as flow m = flow.nn.Identity() input = flow.Tensor(np.random.rand(2, 3, 4, 5)) output = m(input) # output = input