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

Before Change


        raise TypeError("Input type is not a torch.Tensor. Got {}".format(
            type(image)))

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

After Change


                        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: 4

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: PIQuIL/QuCumber
Commit Name: 9a2903dac097a7f3633f6c828533ed385c7159c9
Time: 2019-07-17
Author: emerali@users.noreply.github.com
File Name: qucumber/utils/data.py
Class Name:
Method Name: extract_refbasis_samples


Project Name: rtqichen/torchdiffeq
Commit Name: 7682f0ba7e3f527cb36372e8767cbd708666f9c4
Time: 2020-10-30
Author: rtqichen@gmail.com
File Name: torchdiffeq/_impl/scipy_wrapper.py
Class Name: ScipyWrapperODESolver
Method Name: integrate