Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make model.Generator serializable to TorchScript #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chrisklaiber
Copy link

Test command to serialize the model:

python -c 'import torch ; import model ; m = model.Generator() ; s = torch.jit.script(m)'

Before this change there were two errors during serialization. First, the
interpolate call expects a float rather than an integer:

RuntimeError: Arguments for call are not valid.

Second was the types on the forward call:

RuntimeError: Expected a default value of type Tensor (inferred) on parameter "align_corners".Because "align_corners" was not annotated with an explicit type it is assumed to be type 'Tensor'.:

Test command to serialize the model:

  python -c 'import torch ; import model ; m = model.Generator() ; s = torch.jit.script(m)'

Before this change there were two errors during serialization. First, the
interpolate call expects a float rather than an integer:

  RuntimeError: Arguments for call are not valid.

Second was the types on the forward call:

  RuntimeError: Expected a default value of type Tensor (inferred) on parameter "align_corners".Because "align_corners" was not annotated with an explicit type it is assumed to be type 'Tensor'.:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant