Cannot load ENet Model
duda1202 opened this issue · 2 comments
duda1202 commented
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
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
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!