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
RuntimeError: A view was created in no_grad mode and is being modified inplace with grad mode enabled. This view is the output of a function that returns multiple views. Such functions do not allow the output views to be modified inplace. You should replace the inplace operation by an out-of-place one
#25
Open
rutuja1409 opened this issue
May 2, 2021
· 4 comments
Hello @Jakaria08 I'm getting this error. Can you help me solve this ?
21-05-02 10:35:50.553 - INFO: Total epochs needed: 736 for iters 400,000
2021-05-02 10:35:50.717038: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
21-05-02 10:35:51.840 - INFO: Start training from epoch: 0, iter: 0
Traceback (most recent call last):
File "/content/drive/MyDrive/Project/EESRGAN/train.py", line 94, in
main(config)
File "/content/drive/MyDrive/Project/EESRGAN/train.py", line 73, in main
trainer.train()
File "/content/drive/MyDrive/Project/EESRGAN/trainer/cowc_GAN_FRCNN_trainer.py", line 83, in train
self.model.optimize_parameters(current_step)
File "/content/drive/MyDrive/Project/EESRGAN/model/ESRGAN_EESN_FRCNN_Model.py", line 234, in optimize_parameters
loss_dict = self.netFRCNN(self.intermediate_img, self.targets)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/torchvision/models/detection/generalized_rcnn.py", line 78, in forward
images, targets = self.transform(images, targets)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 889, in call_impl
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/torchvision/models/detection/transform.py", line 110, in forward
images = self.batch_images(images)
File "/usr/local/lib/python3.7/dist-packages/torchvision/models/detection/transform.py", line 215, in batch_images
pad_img[: img.shape[0], : img.shape[1], : img.shape[2]].copy(img)
Above is the error i'm getting. Can you help me ?
The text was updated successfully, but these errors were encountered:
Hello, may I ask if you have solved this problem? Now I have the same problem and I would like to ask for help. Thank you very much @weichen5926 @rutuja1409@Githopp
Hi, I'm sorry to reply you so late.I think it's a Pytorch version problem. For me Pytorch1.2 and 1.10 solved these error. But,you can change "self.intermediate_img = self.final_SR" to“self.intermediate_img = self.final_SR.detach()”.In this way, no error can be reported,but there may be potential problems.I didn't continue to verify. Good luck! @YanADingggg
Hello @Jakaria08 I'm getting this error. Can you help me solve this ?
21-05-02 10:35:50.553 - INFO: Total epochs needed: 736 for iters 400,000
2021-05-02 10:35:50.717038: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
21-05-02 10:35:51.840 - INFO: Start training from epoch: 0, iter: 0
Traceback (most recent call last):
File "/content/drive/MyDrive/Project/EESRGAN/train.py", line 94, in
main(config)
File "/content/drive/MyDrive/Project/EESRGAN/train.py", line 73, in main
trainer.train()
File "/content/drive/MyDrive/Project/EESRGAN/trainer/cowc_GAN_FRCNN_trainer.py", line 83, in train
self.model.optimize_parameters(current_step)
File "/content/drive/MyDrive/Project/EESRGAN/model/ESRGAN_EESN_FRCNN_Model.py", line 234, in optimize_parameters
loss_dict = self.netFRCNN(self.intermediate_img, self.targets)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/torchvision/models/detection/generalized_rcnn.py", line 78, in forward
images, targets = self.transform(images, targets)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 889, in call_impl
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/torchvision/models/detection/transform.py", line 110, in forward
images = self.batch_images(images)
File "/usr/local/lib/python3.7/dist-packages/torchvision/models/detection/transform.py", line 215, in batch_images
pad_img[: img.shape[0], : img.shape[1], : img.shape[2]].copy(img)
Above is the error i'm getting. Can you help me ?
The text was updated successfully, but these errors were encountered: