WangXin93 / fashion_compatibility_mcn

Outfit Compatibility Prediction and Diagnosis with Multi-Layered Comparison Network
MIT License
82 stars 31 forks source link

python main.py is not working #4

Open VickyPenkova opened 4 years ago

VickyPenkova commented 4 years ago

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

WangXin93 commented 3 years ago

Hi,

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