I am getting the following error on a torch.script.load("file.pth", "cuda")
:
RuntimeError:
Unknown type name 'NoneType':
Serialized File "code/__torch__/classification/models/multi_output/model.py", line 9
channels_fc : int
learning_rate : float
scheduler : NoneType
~~~~~~~~ <--- HERE
_torchscript_attributes : Dict[str, List[str]]
features : __torch__.torch.nn.modules.container.Sequential
What does it mean? Is it looking for python code? I thought that torchscript models would not require the original python code to be run.