Skip to content
Discussion options

You must be logged in to vote

Well, I had started working on a minimal example to recreate the issue which is when I realized that the values were changing on every run even without the torchscript conversion. The reason was that I actually wasn't loading my previously saved model when converting...

So I had

model = ModelHeterogeneous(input_dim=args.input_dim, hidden_dim=args.hidden_dim, ngcn=args.ngcn, nmlp=args.nmlp)
ts_model = torch.jit.script(model)

instead of

model = ModelHeterogeneous(input_dim=args.input_dim, hidden_dim=args.hidden_dim, ngcn=args.ngcn, nmlp=args.nmlp)

model.load_state_dict(torch.load(args.model_path))
model.eval()

ts_model = torch.jit.script(model)

Sorry for the trouble!

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rusty1s
Comment options

Answer selected by btglr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants