ZF4444 / MMAL-Net

This is a PyTorch implementation of the paper "Multi-branch and Multi-scale Attention Learning for Fine-Grained Visual Categorization (MMAL-Net)" (Fan Zhang, Meng Li, Guisheng Zhai, Yizhao Liu).
250 stars 57 forks source link

Errors in test.py #2

Closed plutoyuxie closed 4 years ago

plutoyuxie commented 4 years ago

There is a mistake that 'Break' should be deleted. https://github.com/ZF1044404254/TBMSL-Net/blob/9437d1c3d24d4975d72091c84d11bd533e4343c0/test.py#L66

Besides, I have checked the checkpoint model provided for CUB dataset, getting 89.63% accuracy. Thanks. However, errors occur when another checkpoint model provided for Aircraft is loaded. The file named 'air_epoch146.pth' has different keys, as shown below: image

ZF4444 commented 4 years ago

@plutoyuxie Thanks! I have modified the bug you found and pushed the newest code. This problem occurs because the loaded model variable name has module. In front of it, just delete it. After updating the code, it can run rightly

plutoyuxie commented 4 years ago

@ZF1044404254 Thank you for your prompt reply. The air_epoch146.pth model is tested getting 94.51% accuracy. I wonder if I can train a model using my own datasets. Would you mind adding me on Wechat? yjw1000, Thanks.