6ee3f1b0d2a6ebadc9e2f664354594342ab0805d,kornia/augmentation/augmentation.py,RandomSharpness,__init__,#RandomSharpness#Any#Any#Any#Any#,1077
Before Change
sharpness = cast(torch.Tensor, sharpness) if isinstance(sharpness, torch.Tensor) else torch.tensor(sharpness)
if sharpness.dim() == 0:
self.sharpness = torch.tensor([0, sharpness], dtype=torch.float32)
elif sharpness.dim() == 1 and sharpness.size(0) == 2:
self.sharpness = torch.tensor([sharpness[0], sharpness[1]], dtype=torch.float32)
else:
raise ValueError(f""sharpness" must be a scalar or a length 2 tensor. Got {sharpness}.")
After Change
def generate_parameters(self, batch_shape: torch.Size) -> Dict[str, torch.Tensor]:
return dict()
def compute_transformation(self, input: torch.Tensor, params: Dict[str, torch.Tensor]) -> torch.Tensor:
return F.compute_hflip_transformation(input)
def apply_transform(self, input: torch.Tensor, params: Dict[str, torch.Tensor]) -> torch.Tensor:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: arraiy/torchgeometry
Commit Name: 6ee3f1b0d2a6ebadc9e2f664354594342ab0805d
Time: 2020-11-21
Author: justanhduc@users.noreply.github.com
File Name: kornia/augmentation/augmentation.py
Class Name: RandomSharpness
Method Name: __init__
Project Name: rusty1s/pytorch_geometric
Commit Name: 4d43b46afeef2684a8f39d5a102c3017999cecd2
Time: 2019-01-08
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/data/batch.py
Class Name: Batch
Method Name: cumsum
Project Name: pytorch/fairseq
Commit Name: de977736f91d23c53e6a60c45822973a615daa15
Time: 2020-11-02
Author: shajain@fb.com
File Name: fairseq/models/bart/hub_interface.py
Class Name: BARTHubInterface
Method Name: fill_mask