fashion_compatibility_mcn icon indicating copy to clipboard operation
fashion_compatibility_mcn copied to clipboard

python main.py is not working

Open VickyPenkova opened this issue 4 years ago • 1 comments

Fails with: python3 main.py

Traceback (most recent call last):
  File "main.py", line 29, in <module>
    model.load_state_dict(torch.load("../mcn/model_train_relation_vse_type_cond_scales.pth", map_location="cpu"))
  File "/usr/local/lib/python3.8/site-packages/torch/serialization.py", line 571, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "/usr/local/lib/python3.8/site-packages/torch/serialization.py", line 229, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "/usr/local/lib/python3.8/site-packages/torch/serialization.py", line 210, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: '../mcn/model_train_relation_vse_type_cond_scales.pth'

It looks like it tries to find /mcn/model_train_relation_vse_type_cond_scales.pth but it doesn't exist

VickyPenkova avatar Oct 24 '20 10:10 VickyPenkova

Hi,

This problem can be solved by put the pretrained model in the mcn directory.

WangXin93 avatar Aug 09 '21 13:08 WangXin93