b078a27def328cfc16dc7ab17f2537b8593544f1,models/shift_net/shiftnet_model.py,ShiftNetModel,set_input,#ShiftNetModel#Any#,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()
            

        self.set_latent_mask(self.mask_global)

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

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: Zhaoyi-Yan/Shift-Net_pytorch
Commit Name: dc9aafd83851f7c55c6fe61702e281856ec023ca
Time: 2018-12-13
Author: yanzhaoyi@outlook.com
File Name: models/accelerated_shift_net/accelerated_InnerShiftTripleFunction.py
Class Name: AcceleratedInnerShiftTripleFunction
Method Name: forward


Project Name: jsalt18-sentence-repl/jiant
Commit Name: 5b95c6888b15751d0ca2d77d0a01ea7f0abc338f
Time: 2018-06-24
Author: wang.alex.c@gmail.com
File Name: src/models.py
Class Name: MultiTaskModel
Method Name: _lm_forward