I'm getting error while preparing List of operators of your serialized torchscript model. What is the issue here? Is it coming when loading it?
Python code
# Dump list of operators used by MobileNetV2:
import torch, yaml
root = '/content/drive/My Drive/Monitoring/'
model = torch.jit.load(root+'model.pt')
ops = torch.jit.export_opnames(model)
with open('MobileNetV2.yaml', 'w') as output:
yaml.dump(ops, output)
Stack Trace
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-39-8b61c35fb898> in <module>()
3
4 root = '/content/drive/My Drive/Monitoring/'
----> 5 model = torch.jit.load(root+'model.pt')
6 ops = torch.jit.export_opnames(model)
7 with open('MobileNetV2.yaml', 'w') as output:
/usr/local/lib/python3.6/dist-packages/torch/jit/_serialization.py in load(f, map_location, _extra_files)
159 cu = torch._C.CompilationUnit()
160 if isinstance(f, str) or isinstance(f, pathlib.Path):
--> 161 cpp_module = torch._C.import_ir_module(cu, f, map_location, _extra_files)
162 else:
163 cpp_module = torch._C.import_ir_module_from_buffer(
RuntimeError: [enforce fail at inline_container.cc:222] . file not found: archive/constants.pkl