read_file¶ torchvision.io.read_file(path: str) → Tensor[source]¶ 将文件的字节内容作为 uint8 的一维 Tensor 返回。 参数: path (str 或 pathlib.Path) – 要读取的文件的路径 返回值: data (Tensor)