oneflow.nn.Graph.__call__¶
-
Graph.
__call__
(*args, **kwargs)¶ Call nn.Graph subclass instance to run your customized graph.
Call your customized graph after the instantiation:
For example:
g = CustomGraph() out_tensors = g(input_tensors)
The inputs of
__call__
method must match the inputs ofbuild()
method. And the__call__
method will return outputs matching the outputs ofbuild()
method.Note
The first call takes longer than later calls, because nn.Graph will do the computaion graph generation and optimization at the first call.
Donot override this function.