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

Method forward

intermediate_source/torch_export_tutorial.py:143–145  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

141
142class Bad3(torch.nn.Module):
143 def forward(self, x):
144 x = x + 1
145 return x + id(x)
146
147try:
148 export(Bad3(), (torch.randn(3, 3),))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected