mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-23 06:34:55 +08:00
Add basic Module serialization BC test (#96238)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/96238 Approved by: https://github.com/ezyang
This commit is contained in:
@ -2,5 +2,9 @@ import sys
|
||||
import torch
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(torch.jit.load(sys.argv[1]))
|
||||
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)
|
||||
|
Reference in New Issue
Block a user