TorchScript — PyTorch 1.10.1 documentation
https://pytorch.org/docs/stable/jit.htmlModule): def implicitly_compiled_method (self, x): return x + 99 # `forward` is implicitly decorated with `@torch.jit.export`, # so adding it here would have no effect def forward (self, x): return x + 10 @torch. jit. export def another_forward (self, x): # When the compiler sees this call, it will compile # `implicitly_compiled_method` return self. implicitly_compiled_method (x) def unused ...