Chapter 3 Preparing the data

FashionMNIST is a dataset of Zalando's article images, consisting of a training set of 60,000 examples and a test set of 10,000 examples. Each example is a 28x28 grayscale image, associated with a label from 10 classes. The necessary libraries are imported. datasets from torchvision will be used to fetch the FashionMNIST dataset. The FashionMNIST dataset is downloaded to the directory specified in data_folder. The train=True argument means the training set is being fetched. Various details about the dataset, such as the shapes of the images and targets, unique labels, and class names, are printed. This code uses matplotlib to visualize the dataset. For each unique class, 10 random images are displayed in a grid. The total grid size will be the number of unique classes by 10 columns. Here's a quick overview of what this code accomplishes: It downloads the FashionMNIST dataset. It extracts the image data and their labels. It prints information about the dataset. It visualizes 10 random images for each class from the dataset.
Tasks: Dataloaders, Deep Learning Fundamentals
Task Categories: Deep Learning Fundamentals, Computer Vision
Published: 10/24/23
visualizing data
torch datasets