skumra / robotic-grasping

Antipodal Robotic Grasping using GR-ConvNet. IROS 2020.
Other
455 stars 119 forks source link

unable to load pre-trained models "ModuleNotFoundError: No module named 'inference'" #47

Open deshpandeshrinath opened 2 years ago

deshpandeshrinath commented 2 years ago

@skumra when I try to load the trained model checkpoint, it says "ModuleNotFoundError: No module named 'inference'" Please help!

model = torch.load("path_to_checkpoint")
Traceback (most recent call last):
  File "/opt/miniconda3/envs/graspfinder/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3441, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-20-a26a68e6c721>", line 1, in <module>
    a = torch.load("/Users/shrinath.deshpande/dextra/robotic-grasping/trained-models/jacquard-d-grconvnet3-drop0-ch32/epoch_48_iou_0.93")
  File "/opt/miniconda3/envs/graspfinder/lib/python3.7/site-packages/torch/serialization.py", line 607, in load
    return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
  File "/opt/miniconda3/envs/graspfinder/lib/python3.7/site-packages/torch/serialization.py", line 882, in _load
    result = unpickler.load()
  File "/opt/miniconda3/envs/graspfinder/lib/python3.7/site-packages/torch/serialization.py", line 875, in find_class
    return super().find_class(mod_name, name)
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'inference'