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

Class ModuleAdd

extension/pybindings/test/make_test.py:16–29  ·  view source on GitHub ↗

The module to serialize and execute.

Source from the content-addressed store, hash-verified

14
15
16class ModuleAdd(torch.nn.Module):
17 """The module to serialize and execute."""
18
19 def __init__(self):
20 super(ModuleAdd, self).__init__()
21
22 def forward(self, x, y):
23 return x + y
24
25 def get_methods_to_export(self):
26 return ("forward",)
27
28 def get_inputs(self):
29 return (torch.ones(2, 2), torch.ones(2, 2))
30
31
32class ModuleChannelsLast(torch.nn.Module):

Callers 15

test_smokeMethod · 0.90
test_e2eMethod · 0.90
test_module_callableMethod · 0.90
test_stderr_redirectMethod · 0.90
test_quantized_opsMethod · 0.90
test_method_metaMethod · 0.90
test_bad_nameMethod · 0.90

Calls

no outgoing calls

Tested by 15

test_smokeMethod · 0.72
test_e2eMethod · 0.72
test_module_callableMethod · 0.72
test_stderr_redirectMethod · 0.72
test_quantized_opsMethod · 0.72
test_method_metaMethod · 0.72
test_bad_nameMethod · 0.72