0234315776751221ef9da5d2073e32f9f54c01bb,kornia/color/yuv.py,,rgb_to_yuv,#Any#,35

Before Change


    Returns:
        torch.Tensor: YUV version of the image.
    See :class:`~kornia.color.RgbToYuv` for details.
    if not torch.is_tensor(input):
        raise TypeError("Input type is not a torch.Tensor. Got {type(input)}")

    if not(len(input.shape) == 3 or len(input.shape) == 4):
        raise ValueError(f"Input size must have a shape of (*, 3, H, W) or (3, H, W). Got {input.shape}")

    if input.shape[-3] != 3:
        raise ValueError(f"Expected input to have 3 channels, got {input.shape[-3]}")

    r, g, b = torch.chunk(input, chunks=3, dim=-3)

After Change


        >>> input = torch.rand(2, 3, 4, 5)
        >>> output = rgb_to_yuv(input)  // 2x3x4x5
    
    if not isinstance(image, torch.Tensor):
        raise TypeError("Input type is not a torch.Tensor. Got {}".format(
            type(image)))

    if len(image.shape) < 3 or image.shape[-3] != 3:
        raise ValueError("Input size must have a shape of (*, 3, H, W). Got {}"
                         .format(image.shape))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 15

Instances


Project Name: arraiy/torchgeometry
Commit Name: 0234315776751221ef9da5d2073e32f9f54c01bb
Time: 2020-11-01
Author: edgar.riba@gmail.com
File Name: kornia/color/yuv.py
Class Name:
Method Name: rgb_to_yuv


Project Name: prody/ProDy
Commit Name: a902ddf5be91cb738efb1746847f74bb0f756ae2
Time: 2021-02-01
Author: jamesmkrieger@gmail.com
File Name: prody/dynamics/perturb.py
Class Name:
Method Name: calcDynamicFlexibilityIndex


Project Name: prody/ProDy
Commit Name: a902ddf5be91cb738efb1746847f74bb0f756ae2
Time: 2021-02-01
Author: jamesmkrieger@gmail.com
File Name: prody/dynamics/perturb.py
Class Name:
Method Name: calcDynamicCouplingIndex


Project Name: arraiy/torchgeometry
Commit Name: 0234315776751221ef9da5d2073e32f9f54c01bb
Time: 2020-11-01
Author: edgar.riba@gmail.com
File Name: kornia/color/yuv.py
Class Name:
Method Name: yuv_to_rgb