Closed wuyxiquanquan closed 4 years ago
I see, thanks. But I will run seg tasks with bs = 1 and during test or eval period I still use model.train() to keep pace with the training period, but classification tasks will set bs > 128. If we can't ensure the bs > 128 on 1 card, sync BN is a solution(maybe other normalization also can present good acc).
If you want to use syncBN, just uncomment line120 in train.py, but I have not tested training with syncBN yet.
awesome! But when did nn module implement syncBN?
SyncBN is added since pytorch 1.1, you can check the release notes.
Thanks a lot! I checked your information just now. I'm also in USTC!!!
Disable cudnn batch normalization. Open torch/nn/functional.py and find the line with torch.batch_norm and replace the torch.backends.cudnn.enabled with False.