9f960738f0dee048bcea4c29dcabdbd98cad22dd,tests/_tests_cv_classification_transforms/experiment.py,MNIST,__getitem__,#MNIST#Any#,13

Before Change


            tuple: (image, target) where target is index of the target class
        
        image, target = self.data[index], self.targets[index]
        print("++++++++++++++++++++", type(image), type(target))

        if self.transform is not None:
            image = self.transform({"image": image})["image"]

After Change


        if self.transform is not None:
            // fix for albumentations >= v0.5.0 - call `TensorToImage` directly
            if len(image.shape) == 2:
                image = image.unsqueeze(0)
            image = tensor_to_ndimage(image, False, move_channels_dim=True)

            image = self.transform({"image": image})["image"]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 2

Instances


Project Name: Scitator/catalyst
Commit Name: 9f960738f0dee048bcea4c29dcabdbd98cad22dd
Time: 2020-10-21
Author: 19803638+bagxi@users.noreply.github.com
File Name: tests/_tests_cv_classification_transforms/experiment.py
Class Name: MNIST
Method Name: __getitem__


Project Name: xinntao/BasicSR
Commit Name: 2b38855e22530bab3e66dda77c4fc653c141c1d1
Time: 2018-06-11
Author: wxt1994@126.com
File Name: codes/models/modules/sft_arch.py
Class Name:
Method Name:


Project Name: Cadene/pretrained-models.pytorch
Commit Name: e92475c5c3f9c42583b53d5df2ad9c3f9e751fba
Time: 2017-12-02
Author: remi.cadene@icloud.com
File Name: examples/voc2007_extract.py
Class Name:
Method Name: train_multilabel