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

Method forward

beginner_source/nn_tutorial.py:310–311  ·  view source on GitHub ↗
(self, xb)

Source from the content-addressed store, hash-verified

308 self.bias = nn.Parameter(torch.zeros(10))
309
310 def forward(self, xb):
311 return xb @ self.weights + self.bias
312
313###############################################################################
314# Since we're now using an object instead of just using a function, we

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected