Shortcuts

read_file

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

Return the bytes contents of a file as a uint8 1D Tensor.

Parameters:

path (str or pathlib.Path) – the path to the file to be read

Returns:

data (Tensor)

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources