Shortcuts

vflip

torchvision.transforms.functional.vflip(img: Tensor) Tensor[source]

垂直翻转给定的图像。

Parameters:

img (PIL ImageTensor) – 要翻转的图像。如果 img 是 Tensor,则期望其格式为 […, H, W],其中 … 表示它可以有任意数量的前导维度。

Returns:

垂直翻转的图像。

Return type:

PIL 图像或张量

使用 vflip 的示例:

变换的图示

Illustration of transforms