The module to serialize and execute.
| 21 | |
| 22 | |
| 23 | class ModuleAdd(torch.nn.Module): |
| 24 | """The module to serialize and execute.""" |
| 25 | |
| 26 | def __init__(self): |
| 27 | super(ModuleAdd, self).__init__() |
| 28 | |
| 29 | def forward(self, x, y): |
| 30 | return x + y |
| 31 | |
| 32 | def get_methods_to_export(self): |
| 33 | return ("forward",) |
| 34 | |
| 35 | |
| 36 | class ModuleMulti(torch.nn.Module): |
no outgoing calls