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

Class Module

profiler/test/test_profiler_e2e.py:34–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33
34class Module(torch.nn.Module):
35 def __init__(self):
36 super().__init__()
37 self.register_buffer("a", 3 * torch.ones(2, 2, dtype=torch.float))
38 self.register_buffer("b", 2 * torch.ones(2, 2, dtype=torch.float))
39
40 def forward(self, x):
41 a = torch.mul(self.a, x)
42 b = torch.add(a, self.b)
43 return b
44
45
46class TestCustomOps(unittest.TestCase):

Callers 1

setUpClassMethod · 0.70

Calls

no outgoing calls

Tested by 1

setUpClassMethod · 0.56