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