b078a27def328cfc16dc7ab17f2537b8593544f1,models/shift_net/shiftnet_model.py,ShiftNetModel,set_input,#ShiftNetModel#,114

Before Change


        
        // For masking inputs with offline random masks.
        if not self.opt.isTrain and self.opt.offline_testing:
            self.mask_global = Image.open(os.path.join("masks", os.path.splitext(os.path.basename(self.image_paths[0]))[0]+"_mask.png"))
            self.mask_global = transforms.ToTensor()(self.mask_global).unsqueeze(0).type_as(real_A).byte()
            

After Change


        real_B = input["B"].to(self.device)
        // directly load mask offline
        // TODO: make masks variant each image in a batch
        self.mask_global = input["M"].to(self.device).byte()
        self.mask_global = self.mask_global.narrow(0,0,1).narrow(1,0,1)

        // create mask online
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Zhaoyi-Yan/Shift-Net_pytorch
Commit Name: b078a27def328cfc16dc7ab17f2537b8593544f1
Time: 2019-04-27
Author: yanzhaoyi@outlook.com
File Name: models/shift_net/shiftnet_model.py
Class Name: ShiftNetModel
Method Name: set_input


Project Name: developmentseed/label-maker
Commit Name: 6533f4a2123077c55d3a0c8bc04bb5e71c8b36de
Time: 2018-05-08
Author: jreiberkyle@users.noreply.github.com
File Name: label_maker/utils.py
Class Name:
Method Name: is_tif


Project Name: developmentseed/label-maker
Commit Name: f4d4d575203f952dd003a6b2398cd01e02669fc1
Time: 2018-02-25
Author: drew@developmentseed.org
File Name: label_maker/images.py
Class Name:
Method Name: download_images