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

Method __init__

test/models/export_program.py:194–197  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

192
193class ModuleSimpleTrain(torch.nn.Module):
194 def __init__(self):
195 super().__init__()
196 self.linear = torch.nn.Linear(3, 3)
197 self.loss = torch.nn.CrossEntropyLoss()
198
199 def forward(self, x, y):
200 return self.loss(self.linear(x).softmax(dim=0), y)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected