Closed Joe-Tony-Joe closed 2 years ago
Hi, this is caused by batch size=1
. Something is wrong with SyncBN in such as case.
Oh, thank you! I have run it successfully!
@Joe-Tony-Joe hello I would like to ask how to run city8.res50v3+.CPS + CutMix and what commands are needed? Do you use one GPU for training?
Traceback (most recent call last): File "train.py", line 229, in
_, logits_u0_tea_1 = model(unsup_imgs_0, step=1)
File "/root/miniconda3/envs/semiseg/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, kwargs)
File "/root/miniconda3/envs/semiseg/lib/python3.6/site-packages/apex-0.1-py3.6-linux-x86_64.egg/apex/parallel/distributed.py", line 459, in forward
result = self.module(*inputs, *kwargs)
File "/root/miniconda3/envs/semiseg/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(input, kwargs)
File "/root/autodl-tmp/TorchSemiSeg-main/exp.city/city8.res50v3+.CPS+CutMix/network.py", line 28, in forward
return self.branch1(data)
File "/root/miniconda3/envs/semiseg/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, kwargs)
File "/root/autodl-tmp/TorchSemiSeg-main/exp.city/city8.res50v3+.CPS+CutMix/network.py", line 54, in forward
v3plus_feature = self.head(blocks) # (b, c, h, w)
File "/root/miniconda3/envs/semiseg/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, *kwargs)
File "/root/autodl-tmp/TorchSemiSeg-main/exp.city/city8.res50v3+.CPS+CutMix/network.py", line 175, in forward
f = self.aspp(f)
File "/root/miniconda3/envs/semiseg/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(input, kwargs)
File "/root/autodl-tmp/TorchSemiSeg-main/exp.city/city8.res50v3+.CPS+CutMix/network.py", line 122, in forward
pool = self.global_pooling_bn(pool)
File "/root/miniconda3/envs/semiseg/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, *kwargs)
File "/root/miniconda3/envs/semiseg/lib/python3.6/site-packages/apex-0.1-py3.6-linux-x86_64.egg/apex/parallel/sync_batchnorm.py", line 114, in forward
(m-1) self.momentum * var + \
ZeroDivisionError: float division by zero