JUGGHM / PENet_ICRA2021

ICRA 2021 "Towards Precise and Efficient Image Guided Depth Completion"
MIT License
327 stars 46 forks source link

Cannot load ENet Model #37

Closed duda1202 closed 2 years ago

duda1202 commented 2 years ago

Hi,

I am trying to load the e.pth.tar model and I am not able to do it. All I am doing is

import torch
torch.load('e.pth.tar', 'cuda:0')

and it gives me this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/core_uc/.local/lib/python3.6/site-packages/torch/serialization.py", line 608, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/home/core_uc/.local/lib/python3.6/site-packages/torch/serialization.py", line 787, in _legacy_load
    result = unpickler.load()
ModuleNotFoundError: No module named 'metrics'

Would you know what could be the issue? I didpip3 install metrics just in case but it did not work.

JUGGHM commented 2 years ago

Thanks for your interest! Unfortunately we have not met such a issue. I guess the metric refers to metrics.py in our released code. Maybe you could reference it in your code, as we have done in main.py?

duda1202 commented 2 years ago

Yes, i forgot to close the issue. That was it, when I imported your own script metrics.py I was able to torch load it. Thank you!