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

Method forward

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

Source from the content-addressed store, hash-verified

549
550class Foo(torch.nn.Module):
551 def forward(self, x, y):
552 w = x + y
553 return w + torch.ones(4)
554
555dx, dy, d1 = torch.export.dims("dx", "dy", "d1")
556try:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected