71c559e66eaff89089fa447a3d7e04b6835356cf,dataset.py,BaseDataset,img_transform,#BaseDataset#Any#,56

Before Change



    def img_transform(self, img):
        // image to float
        img = img.astype(np.float32)
        img = img.transpose((2, 0, 1))
        img = self.normalize(torch.from_numpy(img.copy()))
        return img

After Change



    def img_transform(self, img):
        // 0-255 to 0-1
        img = np.float32(np.array(img)) / 255.
        img = img.transpose((2, 0, 1))
        img = self.normalize(torch.from_numpy(img.copy()))
        return img
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: CSAILVision/semantic-segmentation-pytorch
Commit Name: 71c559e66eaff89089fa447a3d7e04b6835356cf
Time: 2019-08-02
Author: zhaohang0124@gmail.com
File Name: dataset.py
Class Name: BaseDataset
Method Name: img_transform


Project Name: drckf/paysage
Commit Name: 25694a657492c97276d201a98cff47266060254a
Time: 2016-12-23
Author: charlesfisher@Charless-MacBook-Pro.local
File Name: paysage/layers.py
Class Name: IsingLayer
Method Name: random


Project Name: DT42/BerryNet
Commit Name: 18f9aae4939d79bb3698bb94f46d33c08396daf4
Time: 2019-06-15
Author: bofu@dt42.io
File Name: berrynet/engine/tflite_engine.py
Class Name: TFLiteClassifierEngine
Method Name: process_input