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

Method forward

beginner_source/introyt/modelsyt_tutorial.py:58–63  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

56 self.softmax = torch.nn.Softmax(dim=1)
57
58 def forward(self, x):
59 x = self.linear1(x)
60 x = self.activation(x)
61 x = self.linear2(x)
62 x = self.softmax(x)
63 return x
64
65tinymodel = TinyModel()
66

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected