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

Method __init__

intermediate_source/torch_compile_tutorial.py:121–123  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

119
120class MyModule(torch.nn.Module):
121 def __init__(self):
122 super().__init__()
123 self.lin = torch.nn.Linear(3, 3)
124
125 def forward(self, x):
126 return torch.nn.functional.relu(self.lin(x))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected