mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Partially addresses https://github.com/pytorch/pytorch/issues/123062 Ran lintrunner on: test/mobile Detail: ```Shell $ lintrunner -a --take UFMT --all-files ok No lint issues. Successfully applied all patches. ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/123521 Approved by: https://github.com/shink, https://github.com/ezyang
13 lines
229 B
Python
13 lines
229 B
Python
import torch
|
|
from torch import nn
|
|
|
|
|
|
class NeuralNetwork(nn.Module):
|
|
def forward(self, x):
|
|
return torch.add(x, 10)
|
|
|
|
|
|
model = NeuralNetwork()
|
|
script = torch.jit.script(model)
|
|
torch.jit.save(script, "aot_test_model.pt")
|