15ac1c2bb2627bb8fbb89b0b64709e9a50be02fd,torchsample/transforms/tensor_transforms.py,Compose,__call__,#Compose#,18

Before Change


    def __call__(self, x, y):
        if y is not None:
            for t in self.transforms:
                x, y = t(x, y)
            return x, y
        else:
            for t in self.transforms:

After Change


    def __call__(self, *inputs):
        for transform in self.transforms:
            if not isinstance(inputs, (list,tuple)):
                inputs = [inputs]
            inputs = transform(*inputs)
        return inputs


class ToTensor(object):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: ncullen93/torchsample
Commit Name: 15ac1c2bb2627bb8fbb89b0b64709e9a50be02fd
Time: 2017-05-13
Author: ncullen.th@dartmouth.edu
File Name: torchsample/transforms/tensor_transforms.py
Class Name: Compose
Method Name: __call__


Project Name: logpai/loglizer
Commit Name: d990f23b72c2409084a799bdf49109a996a02256
Time: 2019-02-17
Author: zhujm.home@gmail.com
File Name: demo/PCA_demo.py
Class Name:
Method Name:


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 9e2385f00975bcba7926396c6563eb8488d778f6
Time: 2018-09-02
Author: jan@motl.us
File Name: examples/benchmarking_large/util.py
Class Name:
Method Name: train_encoder