474ed3789d19fd1bdf40a7365a5d196e118132c0,codes/models/SRGAN_model.py,SRGANModel,__init__,#SRGANModel#,17

Before Change


                elif l_pix_type == "l2":
                    self.cri_pix = nn.MSELoss().to(self.device)
                else:
                    raise NotImplementedError("Loss type [%s] is not recognized." % l_pix_type)
                self.l_pix_w = train_opt["pixel_weight"]
            else:
                print("Remove pixel loss.")
                self.cri_pix = None

After Change


                if v.requires_grad:
                    optim_params.append(v)
                else:
                    print("WARNING: params [{:s}] will not optimize.".format(k))
            self.optimizer_G = torch.optim.Adam(optim_params, lr=train_opt["lr_G"], \
                weight_decay=wd_G, betas=(train_opt["beta1_G"], 0.999))
            self.optimizers.append(self.optimizer_G)
            // D
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: xinntao/BasicSR
Commit Name: 474ed3789d19fd1bdf40a7365a5d196e118132c0
Time: 2018-09-09
Author: wxt1994@126.com
File Name: codes/models/SRGAN_model.py
Class Name: SRGANModel
Method Name: __init__


Project Name: xinntao/BasicSR
Commit Name: 474ed3789d19fd1bdf40a7365a5d196e118132c0
Time: 2018-09-09
Author: wxt1994@126.com
File Name: codes/models/networks.py
Class Name:
Method Name: init_weights


Project Name: xinntao/BasicSR
Commit Name: 474ed3789d19fd1bdf40a7365a5d196e118132c0
Time: 2018-09-09
Author: wxt1994@126.com
File Name: codes/models/SRRaGAN_model.py
Class Name: SRRaGANModel
Method Name: __init__


Project Name: xinntao/BasicSR
Commit Name: 474ed3789d19fd1bdf40a7365a5d196e118132c0
Time: 2018-09-09
Author: wxt1994@126.com
File Name: codes/models/SR_model.py
Class Name: SRModel
Method Name: __init__