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

Class Model

recipes_source/regional_aot.py:79–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77
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``.
87 x = self.linear(x)
88 for layer in self.layers:
89 x = layer(x)
90 return x
91
92
93##################################################################################

Callers 2

regional_aot.pyFile · 0.70
aot_compile_load_modelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected