You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered this problem when running in mode "0" to train image-wise network after done training patch-wise one.
Traceback (most recent call last):
File "train.py", line 18, in
iw_model.train()
File "/home/xiaohui8/SR/ICIAR2018/src/models.py", line 300, in train
loss.backward()
File "/home/xiaohui8/miniconda3/envs/pytorch-CycleGAN-and-pix2pix/lib/python3.5/site-packages/torch/tensor.py", line 93, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/xiaohui8/miniconda3/envs/pytorch-CycleGAN-and-pix2pix/lib/python3.5/site-packages/torch/autograd/init.py", line 90, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation
The text was updated successfully, but these errors were encountered:
I encountered this problem when running in mode "0" to train image-wise network after done training patch-wise one.
Traceback (most recent call last):
File "train.py", line 18, in
iw_model.train()
File "/home/xiaohui8/SR/ICIAR2018/src/models.py", line 300, in train
loss.backward()
File "/home/xiaohui8/miniconda3/envs/pytorch-CycleGAN-and-pix2pix/lib/python3.5/site-packages/torch/tensor.py", line 93, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/xiaohui8/miniconda3/envs/pytorch-CycleGAN-and-pix2pix/lib/python3.5/site-packages/torch/autograd/init.py", line 90, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation
I change nn.Dropout(inplace=True) to nn.Dropout()
And it works. Chain of inplace=True is not allowed in PyTorch
I encountered this problem when running in mode "0" to train image-wise network after done training patch-wise one.
Traceback (most recent call last):
File "train.py", line 18, in
iw_model.train()
File "/home/xiaohui8/SR/ICIAR2018/src/models.py", line 300, in train
loss.backward()
File "/home/xiaohui8/miniconda3/envs/pytorch-CycleGAN-and-pix2pix/lib/python3.5/site-packages/torch/tensor.py", line 93, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/xiaohui8/miniconda3/envs/pytorch-CycleGAN-and-pix2pix/lib/python3.5/site-packages/torch/autograd/init.py", line 90, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation
The text was updated successfully, but these errors were encountered: