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

Method __init__

beginner_source/introyt/autogradyt_tutorial.py:255–260  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

253class TinyModel(torch.nn.Module):
254
255 def __init__(self):
256 super(TinyModel, self).__init__()
257
258 self.layer1 = torch.nn.Linear(DIM_IN, HIDDEN_SIZE)
259 self.relu = torch.nn.ReLU()
260 self.layer2 = torch.nn.Linear(HIDDEN_SIZE, DIM_OUT)
261
262 def forward(self, x):
263 x = self.layer1(x)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected