Traceback (most recent call last):
File "/content/drive/MyDrive/SRGAN-PyTorch-master/train.py", line 590, in
main()
File "/content/drive/MyDrive/SRGAN-PyTorch-master/train.py", line 154, in main
main_worker(args.gpu, ngpus_per_node, args)
File "/content/drive/MyDrive/SRGAN-PyTorch-master/train.py", line 392, in main_worker
args=args)
File "/content/drive/MyDrive/SRGAN-PyTorch-master/train.py", line 544, in train_gan
content_loss = content_criterion(sr, hr.detach())
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/content/drive/MyDrive/SRGAN-PyTorch-master/srgan_pytorch/loss.py", line 156, in forward
source = (source - self.mean) / self.std
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!
During the execution of GAN epochs:
Traceback (most recent call last): File "/content/drive/MyDrive/SRGAN-PyTorch-master/train.py", line 590, in
main()
File "/content/drive/MyDrive/SRGAN-PyTorch-master/train.py", line 154, in main
main_worker(args.gpu, ngpus_per_node, args)
File "/content/drive/MyDrive/SRGAN-PyTorch-master/train.py", line 392, in main_worker
args=args)
File "/content/drive/MyDrive/SRGAN-PyTorch-master/train.py", line 544, in train_gan
content_loss = content_criterion(sr, hr.detach())
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/content/drive/MyDrive/SRGAN-PyTorch-master/srgan_pytorch/loss.py", line 156, in forward
source = (source - self.mean) / self.std
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!
Any advice?