fffa476e1e50ff0a59700a6fbfd3531d62fe692a,kornia/augmentation/augmentations.py,RandomGrayscale,forward,#RandomGrayscale#Any#Any#,234
Before Change
if isinstance(input, tuple):
output: torch.Tensor = cast(
torch.Tensor,
F.apply_grayscale(
input[0],
params=params,
return_transform=False))
return output, input[1]
return F.apply_grayscale(input, params=params, return_transform=self.return_transform)
After Change
if params is None:
batch_size = self.infer_batch_size(input)
params = RandomGrayscale.get_params(batch_size, self.p)
return super().forward(input, params)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: tensorflow/models
Commit Name: 5fc4c351699c9007a727eaaef99413962cf0818f
Time: 2020-12-09
Author: hongkuny@google.com
File Name: official/nlp/modeling/layers/self_attention_mask.py
Class Name: SelfAttentionMask
Method Name: call
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