mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Pull Request resolved: https://github.com/pytorch/pytorch/pull/96238 Approved by: https://github.com/ezyang
11 lines
229 B
Python
11 lines
229 B
Python
import sys
|
|
import torch
|
|
|
|
if __name__ == '__main__':
|
|
script_mod = torch.jit.load(sys.argv[1])
|
|
mod = torch.load(sys.argv[1] + ".orig")
|
|
print(script_mod)
|
|
inp = torch.rand(2, 28 * 28)
|
|
_ = mod(inp)
|
|
sys.exit(0)
|