File "train_resnet50_SIPE.py", line 191, in
train()
File "train_resnet50_SIPE.py", line 145, in train
losses.backward()
File "/home/xjt/anaconda3/envs/xjt/lib/python3.6/site-packages/torch/tensor.py", line 221, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/xjt/anaconda3/envs/xjt/lib/python3.6/site-packages/torch/autograd/init.py", line 132, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [16, 21, 32, 32]], which is output 0 of GatherBackward, is at version 3; expected version 2 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
File "train_resnet50_SIPE.py", line 191, in
train()
File "train_resnet50_SIPE.py", line 145, in train
losses.backward()
File "/home/xjt/anaconda3/envs/xjt/lib/python3.6/site-packages/torch/tensor.py", line 221, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/xjt/anaconda3/envs/xjt/lib/python3.6/site-packages/torch/autograd/init.py", line 132, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [16, 21, 32, 32]], which is output 0 of GatherBackward, is at version 3; expected version 2 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
Can you provide me with the modification plan?