oneflow.nn.Graph.__init__¶
-
Graph.
__init__
()¶ Initializes internal Graph states. It MUST be called in
__init__
method of subclass.For example:
>>> import oneflow as flow >>> class SubclassGraph(flow.nn.Graph): ... def __init__(self): ... super().__init__() # MUST be called ... # Then define the graph attributes ... def build(self): ... pass