fffa476e1e50ff0a59700a6fbfd3531d62fe692a,kornia/augmentation/augmentations.py,RandomGrayscale,forward,#RandomGrayscale#Any#Any#,234

Before Change


            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 = RandomGrayscale.get_params(batch_size, self.p)

        if isinstance(input, tuple):

After Change



    def forward(self, input: UnionType, params: Optional[Dict[str, torch.Tensor]] = None) -> UnionType:  // type: ignore
        if params is None:
            batch_size = self.infer_batch_size(input)
            params = RandomGrayscale.get_params(batch_size, self.p)
        return super().forward(input, params)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


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


Project Name: GPflow/GPflow
Commit Name: 5e479101e6f577e2841f89731ccae4402a57cf4d
Time: 2017-08-15
Author: mv310@cam.ac.uk
File Name: GPflow/param.py
Class Name: Param
Method Name: get_samples_df


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