mangye16 / ReID-Survey

Deep Learning for Person Re-identification: A Survey and Outlook
MIT License
617 stars 87 forks source link

多卡训练的精度和比单卡精度低的问题 #20

Open xiguafeichong opened 3 years ago

xiguafeichong commented 3 years ago

跑market1501数据集,全部默认配置,bz=64,单卡map有88.4,4卡的精度只有85.5,请教下各位大佬,这到底是怎么回事,或者应该怎么调整

Hellomodo commented 2 years ago

我理解单卡变成4卡后,实际的batchsize已经和原来不一样了,可以试试调整学习率。

Alexadlu commented 2 years ago

请问为什么我设置多卡训练会出现如下错误, 而单卡训练是正常的 Traceback (most recent call last): File "tools/main.py", line 110, in main() File "tools/main.py", line 70, in main criterion = model.get_creterion(cfg, num_classes) File "/home/yuanhui/anaconda3/envs/agw1/lib/python3.6/site-packages/torch/nn/modules/module.py", line 576, in getattr type(self).name, name)) AttributeError: 'DataParallel' object has no attribute 'get_creterion'