c24a418b1e40dab347dcdcacb4f0755f905e9f79,codes/models/SRGAN_model.py,SRGANModel,test,#SRGANModel#,179
Before Change
def test(self):
self.netG.eval()
for k, v in self.netG.named_parameters():
v.requires_grad = False
self.fake_H = self.netG(self.var_L)
for k, v in self.netG.named_parameters():
v.requires_grad = True
self.netG.train()
def get_current_log(self):
return self.log_dict
After Change
def test(self):
self.netG.eval()
with torch.no_grad():
self.fake_H = self.netG(self.var_L)
self.netG.train()
def get_current_log(self):
return self.log_dict
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 14
Instances
Project Name: xinntao/BasicSR
Commit Name: c24a418b1e40dab347dcdcacb4f0755f905e9f79
Time: 2018-10-06
Author: wxt1994@126.com
File Name: codes/models/SRGAN_model.py
Class Name: SRGANModel
Method Name: test
Project Name: xinntao/BasicSR
Commit Name: c24a418b1e40dab347dcdcacb4f0755f905e9f79
Time: 2018-10-06
Author: wxt1994@126.com
File Name: codes/models/SRRaGAN_model.py
Class Name: SRRaGANModel
Method Name: test
Project Name: xinntao/BasicSR
Commit Name: c24a418b1e40dab347dcdcacb4f0755f905e9f79
Time: 2018-10-06
Author: wxt1994@126.com
File Name: codes/models/SFTGAN_ACD_model.py
Class Name: SFTGAN_ACD_Model
Method Name: test
Project Name: xinntao/BasicSR
Commit Name: c24a418b1e40dab347dcdcacb4f0755f905e9f79
Time: 2018-10-06
Author: wxt1994@126.com
File Name: codes/models/SRGAN_model.py
Class Name: SRGANModel
Method Name: test
Project Name: xinntao/BasicSR
Commit Name: c24a418b1e40dab347dcdcacb4f0755f905e9f79
Time: 2018-10-06
Author: wxt1994@126.com
File Name: codes/models/SR_model.py
Class Name: SRModel
Method Name: test