to_grayscale¶ torchvision.transforms.v2.functional.to_grayscale(inpt: Tensor, num_output_channels: int = 1) → Tensor¶ 請參閱 Grayscale 以獲取詳細資訊。