87a0ead264ce5fc97997071acb9fe2286d6c425c,kornia/color/gray.py,,rgb_to_grayscale,#Any#,7
Before Change
raise ValueError("Input size must have a shape of (*, 3, H, W). Got {}"
.format(image.shape))
r, g, b = torch.chunk(image, chunks=3, dim=-3)
gray: torch.Tensor = 0.299 * r + 0.587 * g + 0.114 * b
return gray
After Change
raise ValueError("Input size must have a shape of (*, 3, H, W). Got {}"
.format(image.shape))
r: torch.Tensor = image[..., 0:1, :, :]
g: torch.Tensor = image[..., 1:2, :, :]
b: torch.Tensor = image[..., 2:3, :, :]
gray: torch.Tensor = 0.299 * r + 0.587 * g + 0.114 * b
return gray
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 20
Instances
Project Name: arraiy/torchgeometry
Commit Name: 87a0ead264ce5fc97997071acb9fe2286d6c425c
Time: 2020-11-02
Author: edgar.riba@gmail.com
File Name: kornia/color/gray.py
Class Name:
Method Name: rgb_to_grayscale
Project Name: arraiy/torchgeometry
Commit Name: 87a0ead264ce5fc97997071acb9fe2286d6c425c
Time: 2020-11-02
Author: edgar.riba@gmail.com
File Name: kornia/color/gray.py
Class Name:
Method Name: rgb_to_grayscale
Project Name: arraiy/torchgeometry
Commit Name: 87a0ead264ce5fc97997071acb9fe2286d6c425c
Time: 2020-11-02
Author: edgar.riba@gmail.com
File Name: kornia/color/yuv.py
Class Name:
Method Name: yuv_to_rgb
Project Name: arraiy/torchgeometry
Commit Name: 87a0ead264ce5fc97997071acb9fe2286d6c425c
Time: 2020-11-02
Author: edgar.riba@gmail.com
File Name: kornia/color/yuv.py
Class Name:
Method Name: rgb_to_yuv