Tandon-A / emotic

PyTorch implementation of Emotic CNN methodology to recognize emotions in images using context information.
MIT License
134 stars 47 forks source link

AttributeError: Can't get attribute 'Emotic' on <module '__main__' from 'main.py'> #15

Closed JASCRAJ closed 2 years ago

JASCRAJ commented 2 years ago

while loading pretrained 'model_emotic1.pth' getting this error

mode inference Traceback (most recent call last): File "main.py", line 102, in inference_emotic(args.inference_file, model_path, result_path, context_norm, body_norm, ind2cat, ind2vad, args) File "E:\emotic-master\inference.py", line 110, in inference_emotic emotic_model = torch.load(os.path.join(model_path,'model_emotic1.pth')).to(device) File "C:\Python\Python36\lib\site-packages\torch\serialization.py", line 592, in load return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args) File "C:\Python\Python36\lib\site-packages\torch\serialization.py", line 851, in _load result = unpickler.load() AttributeError: Can't get attribute 'Emotic' on <module 'main' from 'main.py'>

Tandon-A commented 2 years ago

@JASCRAJ Hello, Thanks for bringing this issue to my notice. I have fixed the same. You can take a pull of the updated code.

Regards, Abhishek