jiaowoguanren0615 / MobileNetV4

This is a warehouse for MobileNetV4-Pytorch-model, can be used to train your image-datasets for vision tasks.
MIT License
84 stars 13 forks source link

training done, when predict got an error. #5

Open qwerty200696 opened 1 month ago

qwerty200696 commented 1 month ago

I train model with single-machine single-GPU, here is the error log:

Test: Total time: 0:10:10 (0.4606 s / it) Acc@1 74.429 Acc@5 100.000 loss 0.673 Accuracy of the network on the 31809 test images: 74.4% Max accuracy: 75.11% Training time 5:37:41 Traceback (most recent call last): File "/code/xxx/code/MobileNetV4/train_gpu.py", line 517, in main(args) File "/code/xxx/code/MobileNetV4/train_gpu.py", line 496, in main model_predict = create_model( File "/usr/local/lib/python3.9/dist-packages/timm/models/_factory.py", line 114, in create_model model = create_fn( File "/code/xxx/code/MobileNetV4/models/build_models.py", line 342, in mobilenetv4_small model = MobileNetV4('MobileNetV4ConvSmall', **kwargs) TypeError: init() got an unexpected keyword argument 'args'

jiaowoguanren0615 commented 3 weeks ago

Thank you for your finding, I should use a specific model name, I have modified the bug in train_gpu.py on the line 501, you can modify the code according to your model