You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "test_type.py", line 32, in <module>
s_foo.save("test_foo.pt")
RuntimeError:
Could not export Python function call 'type'. Remove calls to Python functions before export. Did you forget to add @script or @script_method annotation? If this is a nn.ModuleList, add it to __constants__:
File "test_type.py", line 11
if check_input(img):
return img
raise TypeError("Unexpected input type. Got {}".format(type(img)))
~~~~ <--- HERE
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
馃悰 Bug
The following error
is raised only on
save
and in a specific case. See below.To Reproduce
and output
Environment
Please copy and paste the output from our
environment collection script
(or fill out the checklist below manually).
You can get the script and run it with:
Additional context
Torchvision transforms scripting
cc @gmagogsfm
The text was updated successfully, but these errors were encountered: