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

Method forward

test/models/export_program.py:151–154  ·  view source on GitHub ↗
(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

149 self.b = 2 * torch.ones(2, 2, dtype=torch.float)
150
151 def forward(self, x: torch.Tensor):
152 out_1 = torch.mul(self.a, x)
153 out_2 = torch.add(out_1, self.b)
154 return out_2
155
156 def get_random_inputs(self):
157 return (torch.ones(2, 2, dtype=torch.float),)

Callers

nothing calls this directly

Calls 2

mulMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected