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

Method forward

intermediate_source/torch_export_tutorial.py:70–71  ·  view source on GitHub ↗
(self, x, y)

Source from the content-addressed store, hash-verified

68 self.lin = torch.nn.Linear(100, 10)
69
70 def forward(self, x, y):
71 return torch.nn.functional.relu(self.lin(x + y), inplace=True)
72
73mod = MyModule()
74exported_mod = export(mod, (torch.randn(8, 100), torch.randn(8, 100)))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected