MCPcopy Create free account
hub / github.com/pytorch/examples / __init__

Method __init__

distributed/ddp/example.py:21–25  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

19
20class ToyModel(nn.Module):
21 def __init__(self):
22 super(ToyModel, self).__init__()
23 self.net1 = nn.Linear(10, 10)
24 self.relu = nn.ReLU()
25 self.net2 = nn.Linear(10, 5)
26
27 def forward(self, x):
28 return self.net2(self.relu(self.net1(x)))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected