February 2018
Intermediate to advanced
262 pages
6h 59m
English
The PyTorch torchvision.datasets package provides a utility class called ImageFolder that can be used to load images along with their associated labels when data is presented in the aforementioned format. It is a common practice to perform the following preprocessing steps:
PyTorch makes a lot of these preprocessing steps easier by providing a lot of utility functions in the transforms module. For our example, let's apply three transformations: