bd155f2d58357de72c4a80699fde34e2c515c540,codes/models/SR_model.py,SRModel,feed_data,#SRModel#Any#Any#Any#,67

Before Change


    def feed_data(self, data, volatile=False, need_HR=True):
        // LR
        input_L = data["LR"]
        self.input_L.resize_(input_L.size()).copy_(input_L)
        self.var_L = Variable(self.input_L, volatile=volatile)

        if need_HR:
            input_H = data["HR"]
            self.input_H.resize_(input_H.size()).copy_(input_H)
            self.real_H = Variable(self.input_H, volatile=volatile)

    def optimize_parameters(self, step):
        self.optimizer_G.zero_grad()
        self.fake_H = self.netG(self.var_L)

After Change


        print("-----------------------------------------------")

    def feed_data(self, data, volatile=False, need_HR=True):
        self.var_L = data["LR"].to(self.device) // LR

        if need_HR:
            self.real_H = data["HR"].to(self.device) // HR

    def optimize_parameters(self, step):
        self.optimizer_G.zero_grad()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 23

Instances


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


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: feed_data


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


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: feed_data