854f604719b6a571e47ad3ca8b758cec4133d2f7,kornia/augmentation/augmentation.py,RandomPosterize,__init__,#RandomPosterize#Any#Any#Any#Any#Any#,1065
Before Change
) -> None:
super(RandomPosterize, self).__init__(p=p, return_transform=return_transform, same_on_batch=same_on_batch,
keepdim=keepdim)
bits = cast(torch.Tensor, bits) if isinstance(bits, torch.Tensor) else torch.tensor(bits)
if len(bits.size()) == 0:
self.bits = torch.tensor([bits, torch.tensor(8)], dtype=torch.float32)
elif len(bits.size()) == 1 and bits.size(0) == 2:
self.bits = torch.tensor([bits[0], bits[1]], dtype=torch.float32)
else:
raise ValueError(f""bits" shall be either a scalar or a length 2 tensor. Got {bits}.")
After Change
) -> None:
super(RandomPosterize, self).__init__(p=p, return_transform=return_transform, same_on_batch=same_on_batch,
keepdim=keepdim)
self._device, self._dtype = _extract_device_dtype([bits])
self.bits = bits
def __repr__(self) -> str:
repr = f"(bits={self.bits}"
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances
Project Name: arraiy/torchgeometry
Commit Name: 854f604719b6a571e47ad3ca8b758cec4133d2f7
Time: 2021-01-05
Author: sj8716643@126.com
File Name: kornia/augmentation/augmentation.py
Class Name: RandomPosterize
Method Name: __init__
Project Name: arraiy/torchgeometry
Commit Name: 854f604719b6a571e47ad3ca8b758cec4133d2f7
Time: 2021-01-05
Author: sj8716643@126.com
File Name: kornia/augmentation/augmentation.py
Class Name: RandomPosterize
Method Name: __init__
Project Name: arraiy/torchgeometry
Commit Name: 854f604719b6a571e47ad3ca8b758cec4133d2f7
Time: 2021-01-05
Author: sj8716643@126.com
File Name: kornia/augmentation/augmentation.py
Class Name: RandomSolarize
Method Name: __init__
Project Name: arraiy/torchgeometry
Commit Name: 854f604719b6a571e47ad3ca8b758cec4133d2f7
Time: 2021-01-05
Author: sj8716643@126.com
File Name: kornia/augmentation/augmentation.py
Class Name: RandomSharpness
Method Name: __init__