I am getting the following error in the code on running the following command.
$ python train.py -c config_GAN.json
Traceback (most recent call last):
File "train.py", line 101, in
main(config)
File "train.py", line 80, in main
trainer.train()
File "/home/jovyan/EESRGAN/trainer/cowc_GAN_FRCNN_trainer.py", line 88, in train
self.model.optimize_parameters(current_step)
File "/home/jovyan/EESRGAN/model/ESRGAN_EESN_FRCNN_Model.py", line 243, in optimize_parameters
losses.backward()
File "/opt/conda/lib/python3.7/site-packages/torch/tensor.py", line 198, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/opt/conda/lib/python3.7/site-packages/torch/autograd/init.py", line 100, 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 [3, 64, 3, 3]] 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).
I have torch version 1.6.0 and torchvision version 0.6
I am getting the following error in the code on running the following command.
$ python train.py -c config_GAN.json
Traceback (most recent call last): File "train.py", line 101, in
main(config)
File "train.py", line 80, in main
trainer.train()
File "/home/jovyan/EESRGAN/trainer/cowc_GAN_FRCNN_trainer.py", line 88, in train
self.model.optimize_parameters(current_step)
File "/home/jovyan/EESRGAN/model/ESRGAN_EESN_FRCNN_Model.py", line 243, in optimize_parameters
losses.backward()
File "/opt/conda/lib/python3.7/site-packages/torch/tensor.py", line 198, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/opt/conda/lib/python3.7/site-packages/torch/autograd/init.py", line 100, 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 [3, 64, 3, 3]] 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).
I have torch version 1.6.0 and torchvision version 0.6