Wavelet-U-net-Dehazing icon indicating copy to clipboard operation
Wavelet-U-net-Dehazing copied to clipboard

a problem with the backpropagation process

Open cloudyliy opened this issue 4 years ago • 5 comments

The following error occurred when running the code:

File "/home/xxx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/tensor.py", line 102, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "/home/xxx/anaconda3/envs/pytorch/lib/python3.6/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

It seems that there is a problem with the backpropagation process. Has the author encountered such a problem? My pytorch version is 1.1.0, thank you!

cloudyliy avatar Dec 22 '20 08:12 cloudyliy

Thanks for your interest. Can you show the detailed error message? In our machine, I don't encounter this condition.

Best Regards

dectrfov avatar Dec 23 '20 14:12 dectrfov

The following error occurred when running the code:

File "/home/xxx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/tensor.py", line 102, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "/home/xxx/anaconda3/envs/pytorch/lib/python3.6/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

It seems that there is a problem with the backpropagation process. Has the author encountered such a problem? My pytorch version is 1.1.0, thank you!

I also encounter the problem, do you solve it? Could you tell me the solutions?

luoxiaodou avatar Feb 13 '21 01:02 luoxiaodou

The following error occurred when running the code: File "/home/xxx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/tensor.py", line 102, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "/home/xxx/anaconda3/envs/pytorch/lib/python3.6/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 It seems that there is a problem with the backpropagation process. Has the author encountered such a problem? My pytorch version is 1.1.0, thank you!

I also encounter the problem, do you solve it? Could you tell me the solutions?

I met the same problem,do you solve it?

zj1010 avatar Apr 15 '23 10:04 zj1010

运行代码时出现以下错误:文件“/home/xxx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/tensor.py”第102行,向后torch.autograd.backward(自我,渐变,保留_graph,create_graph)文件“/home/xxx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/autograd/init.py”,第90行,向后allow_unreachable=True) # allow_unreachable标志RuntimeError:梯度计算所需的一个变量就就地修改反向传播过程似乎存在问题。作者遇到过这样的问题吗?我的pytorch版本是1.1.0,谢谢!> >> >> > 我也遇到了这个问题,你解决了吗?你能告诉我解决方案吗?>> 我遇到了同样的问题,你解决了吗?

Ypigeon avatar Mar 06 '24 12:03 Ypigeon

Hello, I also have the above problem, I would like to ask if there is any solution? Thank you! Traceback (most recent call last): File "D:\Wavelet-U-net-Dehazing-master\train.py", line 130, in main(config_args) File "D:\Wavelet-U-net-Dehazing-master\train.py", line 96, in main loss.backward() File "D:\anaconda\envs\pytorch\lib\site-packages\torch_tensor.py", line 488, in backward torch.autograd.backward( File "D:\anaconda\envs\pytorch\lib\site-packages\torch\autograd_init_.py", line 197, in backward Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [16, 4, 64, 64]], which is output 0 of AsStridedBackward0, is at version 16; expected version 15 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!

xiaowowwwww avatar Apr 09 '24 09:04 xiaowowwwww