bd155f2d58357de72c4a80699fde34e2c515c540,codes/models/SRGAN_model.py,SRGANModel,optimize_parameters,#SRGANModel#,136

Before Change


        if step % self.D_update_ratio == 0 and step > self.D_init_iters:
            // G
            if self.cri_pix:
                self.log_dict["l_g_pix"] = l_g_pix.data[0]
            if self.cri_fea:
                self.log_dict["l_g_fea"] = l_g_fea.data[0]
            self.log_dict["l_g_gan"] = l_g_gan.data[0]
        // D

After Change


        if self.opt["train"]["gan_type"] == "wgan-gp":
            self.log_dict["l_d_gp"] = l_d_gp.item()
        // D outputs
        self.log_dict["D_real"] = torch.mean(pred_d_real.detach())
        self.log_dict["D_fake"] = torch.mean(pred_d_fake.detach())

    def test(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: xinntao/BasicSR
Commit Name: bd155f2d58357de72c4a80699fde34e2c515c540
Time: 2018-06-16
Author: wxt1994@126.com
File Name: codes/models/SRGAN_model.py
Class Name: SRGANModel
Method Name: optimize_parameters


Project Name: xinntao/BasicSR
Commit Name: bd155f2d58357de72c4a80699fde34e2c515c540
Time: 2018-06-16
Author: wxt1994@126.com
File Name: codes/models/SFTGAN_ACD_model.py
Class Name: SFTGAN_ACD_Model
Method Name: optimize_parameters


Project Name: ikostrikov/pytorch-a2c-ppo-acktr
Commit Name: e7f739f3ad1a377bfbcd0b92c55c2b9d947764fc
Time: 2018-04-24
Author: ikostrikov@gmail.com
File Name: main.py
Class Name:
Method Name: main


Project Name: activatedgeek/LeNet-5
Commit Name: b9d7f39a752d23a7de60ea6d679812c401fab57e
Time: 2019-01-01
Author: 1sanyamkapoor@gmail.com
File Name: run.py
Class Name:
Method Name: test


Project Name: activatedgeek/LeNet-5
Commit Name: b9d7f39a752d23a7de60ea6d679812c401fab57e
Time: 2019-01-01
Author: 1sanyamkapoor@gmail.com
File Name: run.py
Class Name:
Method Name: train