1c5c2f50da5ae101077c27fdac2a12fb1619ec86,models/pix2pix_model.py,Pix2PixModel,set_input,#Pix2PixModel#Any#,63
Before Change
AtoB = self.opt.which_direction == "AtoB"
input_A = input["A" if AtoB else "B"]
input_B = input["B" if AtoB else "A"]
self.input_A.resize_(input_A.size()).copy_(input_A)
self.input_B.resize_(input_B.size()).copy_(input_B)
self.image_paths = input["A_paths" if AtoB else "B_paths"]
def forward(self):
After Change
def set_input(self, input):
AtoB = self.opt.which_direction == "AtoB"
input_A = input["A" if AtoB else "B"]
input_B = input["B" if AtoB else "A"]
if len(self.gpu_ids) > 0:
input_A = input_A.cuda(self.gpu_ids[0], async=True)
input_B = input_B.cuda(self.gpu_ids[0], async=True)
self.input_A = input_A
self.input_B = input_B
self.image_paths = input["A_paths" if AtoB else "B_paths"]
def forward(self):
self.real_A = Variable(self.input_A)
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 13
Instances
Project Name: junyanz/pytorch-CycleGAN-and-pix2pix
Commit Name: 1c5c2f50da5ae101077c27fdac2a12fb1619ec86
Time: 2018-01-13
Author: tongzhou.wang.1994@gmail.com
File Name: models/pix2pix_model.py
Class Name: Pix2PixModel
Method Name: set_input
Project Name: junyanz/pytorch-CycleGAN-and-pix2pix
Commit Name: 1c5c2f50da5ae101077c27fdac2a12fb1619ec86
Time: 2018-01-13
Author: tongzhou.wang.1994@gmail.com
File Name: models/cycle_gan_model.py
Class Name: CycleGANModel
Method Name: set_input
Project Name: richzhang/colorization-pytorch
Commit Name: 1c5c2f50da5ae101077c27fdac2a12fb1619ec86
Time: 2018-01-13
Author: tongzhou.wang.1994@gmail.com
File Name: models/pix2pix_model.py
Class Name: Pix2PixModel
Method Name: set_input
Project Name: junyanz/BicycleGAN
Commit Name: 51409e5df575411bff4d54e30d293c8cc58a3d0f
Time: 2018-01-31
Author: junyanz@visiongpu18.csail.mit.edu
File Name: models/base_model.py
Class Name: BaseModel
Method Name: set_input