hflip¶ torchvision.transforms.functional.hflip(img: Tensor) → Tensor[原始碼]¶ 水平翻轉給定影像。 引數: img (PIL Image 或 Tensor) – 要翻轉的影像。如果 img 是 Tensor,它應符合 […, H, W] 格式,其中 … 表示它可以有任意數量的前導維度。 返回: 水平翻轉後的影像。 返回型別: PIL 影像或張量 使用 hflip 的示例 轉換圖示 轉換圖示