Open emiliocicese opened 11 months ago
HI,
Did u solve this error? I also got the same error.
HI,
Did u solve this error? I also got the same error.
You'd better use the version of python and pytorch mentioned in the repository. New version like pytorch 2.2 or pytorch 1.10 will not be ok.
Okay, Thanks..
在model.py中 1.将 u_d, noise = self.denoise_net(u_list[-1])改为 u_d, noise = self.denoise_net(u_list[-1].detach()) 2.将denoise_loss = self._denoise_criterion(u_list[-1], u_list[-2])改为denoise_loss = self._denoise_criterion(u_list[-1], u_list[-2].detach())
在model.py中 1.将 u_d, noise = self.denoise_net(u_list[-1])改为 u_d, noise = self.denoise_net(u_list[-1].detach()) 2.将denoise_loss = self._denoise_criterion(u_list[-1], u_list[-2])改为denoise_loss = self._denoise_criterion(u_list[-1], u_list[-2].detach())
老哥好聪明啊,请问这是什么原理呢?
When i run train.py it appears: RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [3, 12, 1, 1]] is at version 51; expected version 50 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).