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