dac6839364405ff932bc33a5ca7845cba4f8b4ce,kornia/color/adjust.py,,adjust_brightness,#Any#Any#,31

Before Change


            type(image)))

    if len(image.shape) < 3:
        raise ValueError("Input size must have a shape of (*, H, W). Got {}"
                         .format(image.shape))

    if (brightness_factor < torch.zeros(1)).any():
        raise ValueError("Brightness factor must be non-negative. Got {}"
                         .format(brightness_factor))

After Change


        raise TypeError(f"The factor should be either a float or torch.Tensor. "
                        f"Got {type(brightness_factor)}")

    if isinstance(brightness_factor, float):
        brightness_factor = torch.tensor([brightness_factor])

    brightness_factor = brightness_factor.to(input.device).to(input.dtype)

    if (brightness_factor < torch.zeros(1)).any():
        raise ValueError(f"Brightness factor must be non-negative. Got {brightness_factor}")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: arraiy/torchgeometry
Commit Name: dac6839364405ff932bc33a5ca7845cba4f8b4ce
Time: 2019-10-07
Author: edgar.riba@gmail.com
File Name: kornia/color/adjust.py
Class Name:
Method Name: adjust_brightness


Project Name: rusty1s/pytorch_geometric
Commit Name: 75f23d5304cef26f844f14e0bbdd7d011d8980bf
Time: 2020-01-15
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/transforms/delaunay.py
Class Name: Delaunay
Method Name: __call__


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__