to_grayscale¶ torchvision.transforms.v2.functional.to_grayscale(inpt: Tensor, num_output_channels: int = 1) → Tensor¶ 有关详细信息,请参阅 Grayscale。