MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / SubModule

Class SubModule

python/oneflow/test/graph/test_graph.py:31–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30
31class SubModule(flow.nn.Module):
32 def __init__(self):
33 super().__init__()
34 self.conv1 = flow.nn.Conv2d(1, 1, 5)
35 self.relu = flow.nn.ReLU()
36
37 def forward(self, x):
38 x = self.conv1(x)
39 x = self.relu(x)
40 return x
41
42
43class CustomModule(flow.nn.Module):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by 1

__init__Method · 0.56