KarelZhang / RUAS

[CVPR 2021] This is the official code for the paper "Retinex-inspired Unrolling with Cooperative Prior Architecture Search for Low-light Image Enhancement"
113 stars 31 forks source link

Run time error #8

Open emiliocicese opened 11 months ago

emiliocicese commented 11 months ago

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).

nishavarghese15 commented 8 months ago

HI,

Did u solve this error? I also got the same error.

Henry-GongZY commented 8 months ago

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.

nishavarghese15 commented 8 months ago

Okay, Thanks..

ChouMaoAn commented 2 months ago

在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())

XiongZhongxia commented 1 month ago

在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())

老哥好聪明啊,请问这是什么原理呢?