Skip to content

Make model.Generator serializable to TorchScript#47

Open
chrisklaiber wants to merge 1 commit into
bryandlee:mainfrom
chrisklaiber:torchscriptable
Open

Make model.Generator serializable to TorchScript#47
chrisklaiber wants to merge 1 commit into
bryandlee:mainfrom
chrisklaiber:torchscriptable

Conversation

@chrisklaiber

Copy link
Copy Markdown

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.

1 participant