PILToTensor¶ class torchvision.transforms.PILToTensor[source]¶ 将 PIL Image 转换为相同类型的张量 - 此操作不缩放值。 此转换不支持 torchscript。 将 PIL Image (H x W x C) 转换为形状为 (C x H x W) 的张量。 PILToTensor 的示例 如何使用 CutMix 和 MixUp 如何使用 CutMix 和 MixUp