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()
            

After Change


        // 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
        if not self.opt.offline_loading_mask:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

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: cornellius-gp/gpytorch
Commit Name: c52ea4b95d7d0e8cb6c2a8ab323deb6d42264fdf
Time: 2020-01-31
Author: jake.gardner@uber.com
File Name: gpytorch/lazy/added_diag_lazy_tensor.py
Class Name: AddedDiagLazyTensor
Method Name: _init_cache_for_constant_diag


Project Name: cornellius-gp/gpytorch
Commit Name: 59d4a8b3bea3b5969f79b45456c8e594b617ce92
Time: 2017-11-13
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/toeplitz_lazy_variable.py
Class Name: ToeplitzLazyVariable
Method Name: add_jitter