6ee3f1b0d2a6ebadc9e2f664354594342ab0805d,kornia/augmentation/augmentation.py,RandomSolarize,__init__,#RandomSolarize#Any#Any#Any#Any#Any#,944

Before Change


        super(RandomSolarize, self).__init__(p=p, return_transform=return_transform, same_on_batch=same_on_batch)

        thresholds = \
            cast(torch.Tensor, thresholds) if isinstance(thresholds, torch.Tensor) else torch.tensor(thresholds)
        self.thresholds = _range_bound(thresholds, "thresholds", center=0.5, bounds=(0., 1.))

        additions = \

After 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}.")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

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: RandomSolarize
Method Name: __init__


Project Name: cornellius-gp/gpytorch
Commit Name: 050ecc019887a162dc8042d1f5de56c8df6816ce
Time: 2020-06-19
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/lazy_evaluated_kernel_tensor.py
Class Name: LazyEvaluatedKernelTensor
Method Name: _getitem


Project Name: cornellius-gp/gpytorch
Commit Name: 3d232f9c1138c39f714799e92b16b3f1019dcd8b
Time: 2019-04-06
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/lazy_evaluated_kernel_tensor.py
Class Name: LazyEvaluatedKernelTensor
Method Name: __getitem__


Project Name: geomstats/geomstats
Commit Name: 4e904cc50e793112b406f834d7432e766c6a0be4
Time: 2020-04-19
Author: 62605255+pchauchat@users.noreply.github.com
File Name: geomstats/_backend/pytorch/__init__.py
Class Name:
Method Name: assignment