fffa476e1e50ff0a59700a6fbfd3531d62fe692a,kornia/augmentation/augmentations.py,ColorJitter,forward,#ColorJitter#Any#Any#,190

Before Change



    def forward(self, input: UnionType, params: Optional[Dict[str, torch.Tensor]] = None) -> UnionType:  // type: ignore
        if params is None:
            if isinstance(input, tuple):
                batch_size = input[0].shape[0] if len(input[0].shape) == 4 else 1
            else:
                batch_size = input.shape[0] if len(input.shape) == 4 else 1
            params = ColorJitter.get_params(batch_size, self.brightness, self.contrast, self.saturation, self.hue)

        if isinstance(input, tuple):

After Change


        if params is None:
            batch_size = self.infer_batch_size(input)
            params = ColorJitter.get_params(batch_size, self.brightness, self.contrast, self.saturation, self.hue)
        return super().forward(input, params)


class RandomGrayscale(AugmentationBase):
    rRandom Grayscale transformation according to a probability p value
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: arraiy/torchgeometry
Commit Name: fffa476e1e50ff0a59700a6fbfd3531d62fe692a
Time: 2020-01-20
Author: sj8716643@126.com
File Name: kornia/augmentation/augmentations.py
Class Name: ColorJitter
Method Name: forward


Project Name: scipy/scipy
Commit Name: 8aa27bbac3e52d7f214ba22028afcbd4cf13b97d
Time: 2020-07-07
Author: peterbell10@live.co.uk
File Name: scipy/spatial/kdtree.py
Class Name: KDTree
Method Name: query_ball_point


Project Name: arraiy/torchgeometry
Commit Name: fffa476e1e50ff0a59700a6fbfd3531d62fe692a
Time: 2020-01-20
Author: sj8716643@126.com
File Name: kornia/augmentation/augmentations.py
Class Name: RandomGrayscale
Method Name: forward