f4ca9b361adb382423c753f7f864a5dd0e454964,torchsample/transforms/image_transforms.py,Grayscale,__call__,#Grayscale#,43

Before Change



    def __call__(self, x, y=None):
        x_dst = x[0]*0.299 + x[1]*0.587 + x[2]*0.114
        x_gs = x_dst.repeat(self.channels,1,1)

        if y is not None:
            y_dst = y[0]*0.299 + y[1]*0.587 + y[2]*0.114
            y_gs= y_dst.repeat(self.channels,1,1)

After Change


            _input_dst = _input[0]*0.299 + _input[1]*0.587 + _input[2]*0.114
            _input_gs = _input_dst.repeat(self.channels,1,1)
            outputs.append(_input_gs)
        return outputs if idx > 1 else outputs[0]

class RandomGrayscale(object):
    
    Randomly grayscales some images with given probability,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: ncullen93/torchsample
Commit Name: f4ca9b361adb382423c753f7f864a5dd0e454964
Time: 2017-05-12
Author: ncullen.th@dartmouth.edu
File Name: torchsample/transforms/image_transforms.py
Class Name: Grayscale
Method Name: __call__


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 122c24b4aeb11ecba5f77c3bf5ef8f20f2167c77
Time: 2018-06-07
Author: eriklindernoren@gmail.com
File Name: utils/datasets.py
Class Name: ListDataset
Method Name: __getitem__


Project Name: openai/gym
Commit Name: f37830bbe2c85f613fded1721976dbe94f6bed0b
Time: 2019-03-22
Author: martin.delagorce@gmail.com
File Name: gym/utils/play.py
Class Name:
Method Name: play


Project Name: AIRLab-POLIMI/mushroom
Commit Name: ff55647673a7279b47d1268699839b92aca3e953
Time: 2021-02-10
Author: carlo.deramo@gmail.com
File Name: mushroom_rl/algorithms/value/dqn/rainbow.py
Class Name: RainbowNetwork
Method Name: forward