decode_webp¶
- torchvision.io.decode_webp(input: Tensor, mode: ImageReadMode = ImageReadMode.UNCHANGED) Tensor[source]¶
 将WEBP图像解码为三维RGB[A]张量。
输出张量的值是介于0和255之间的uint8类型。
- Parameters:
 input (Tensor[1]) – 一个一维连续的uint8张量,包含WEBP图像的原始字节。
mode (str 或 ImageReadMode) – 将图像转换的模式,例如“RGB”。 默认值为“UNCHANGED”。请参阅
ImageReadMode以获取可用的模式。
- Returns:
 解码后的图像(Tensor[image_channels, image_height, image_width])