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

Method forward

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

Source from the content-addressed store, hash-verified

852 self.bn = torch.nn.BatchNorm2d(3)
853
854 def forward(self, x):
855 x = self.conv(x)
856 x = self.bn(x)
857 return (x,)
858
859ep_for_training = torch.export.export(DecompExample(), (torch.randn(1, 1, 3, 3),))
860print(ep_for_training.graph)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected