liveBook · Manning

Fashion-MNIST

As explained in Inside Deep Learning: Math, Algorithms, Models

An image dataset of clothing items commonly used as a harder alternative to MNIST.

Fashion-MNIST is a clothing-image dataset used as a more challenging alternative to MNIST while retaining the same size and shape, making experiments practical. section 5.1.3

A typical PyTorch setup treats Fashion-MNIST as a ten-class, single-channel image-classification task:

  • Load training and test splits with torchvision.datasets.FashionMNIST and convert images using transforms.ToTensor(). section 5.1.3
  • Use 28×28 images, one input channel, and ten output classes; batch them with DataLoader. section 6.0
  • Compare fully connected and convolutional networks as baseline models before evaluating later training or architecture changes. section 6.0

Baseline training

Flattened 28×28 inputs can feed a multilayer fully connected network, while a CNN can apply convolution, pooling, flattening, and a ten-class linear output. Cross-entropy loss and test accuracy provide the comparison. section 5.1.3 section 6.0

epochs = 50 #1
B = 256     #2

train_data = torchvision.datasets.FashionMNIST("./data", train=True, 
transform=transforms.ToTensor(), download=True) 
test_data = torchvision.datasets.FashionMNIST("./data", train=False, 
transform=transforms.ToTensor(), download=True)

train_loader = DataLoader(train_data, batch_size=B, shuffle=True) test_loader = DataLoader(test_data, batch_size=B)

The listing shows the dataset, transforms, batch size, shuffling, and train/test loader construction. section 5.1.3

How Inside Deep Learning: Math, Algorithms, Models covers it

How deep it goes
Explains dataset loading and model dimensions through runnable PyTorch baselines, then compares architectures without detailing the dataset’s internal construction.
Examples
Demonstrates torchvision loading, 28×28 single-channel inputs, fully connected and CNN baselines, and adaptive-pooling experiments.
What you can do after
Apply it via PyTorch and torchvision to train, compare, and measure image-classification models.
How it connects
Connects image classification with MNIST, fully connected networks, convolutional neural networks, pooling, optimizers, and learning-rate schedules.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Inside Deep Learning: Math, Algorithms, Models. The section links point to the parts of the book it draws on.