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

Method forward

recipes_source/debug_mode_tutorial.py:150–151  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

148
149class Toy(torch.nn.Module):
150 def forward(self, x):
151 return torch.relu(x).mm(x.T)
152
153inputs = (torch.randn(4, 4),)
154dm_eager, _ = run_model(Toy(), inputs)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected