Shortcuts

读取文件

torchvision.io.read_file(path: str) Tensor[source]

返回文件的字节内容作为 uint8 一维张量。

Parameters:

path (str 或 pathlib.Path) – 要读取文件的路径

Returns:

数据 (张量)