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

Method __init__

recipes_source/regional_aot.py:80–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

78
79class Model(torch.nn.Module):
80 def __init__(self):
81 super().__init__()
82 self.linear = torch.nn.Linear(10, 10)
83 self.layers = torch.nn.ModuleList([Layer() for _ in range(64)])
84
85 def forward(self, x):
86 # In regional compilation, the self.linear is outside of the scope of ``torch.compile``.

Callers

nothing calls this directly

Calls 2

LayerClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected