From dc101e5d955c18015734acc582c7b138de3118c2 Mon Sep 17 00:00:00 2001 From: Guillem Romero Naranjo Date: Tue, 28 Jul 2026 19:27:35 +0200 Subject: [PATCH] Improve explanations in Quickstart tutorial --- beginner_source/basics/quickstart_tutorial.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/beginner_source/basics/quickstart_tutorial.py b/beginner_source/basics/quickstart_tutorial.py index 0cf469f31f..37cce69b35 100644 --- a/beginner_source/basics/quickstart_tutorial.py +++ b/beginner_source/basics/quickstart_tutorial.py @@ -65,6 +65,17 @@ train_dataloader = DataLoader(training_data, batch_size=batch_size) test_dataloader = DataLoader(test_data, batch_size=batch_size) + +###################################################################### +# Each batch of images has shape ``[N, C, H, W]``: +# +# - ``N`` is the number of images in the batch. +# - ``C`` is the number of image channels. +# - ``H`` and ``W`` are the image height and width respectively. +# +# FashionMNIST images have one grayscale channel and are 28 by 28 pixels. +# The labels tensor contains one class index for each image. + for X, y in test_dataloader: print(f"Shape of X [N, C, H, W]: {X.shape}") print(f"Shape of y: {y.shape} {y.dtype}")