Build an AutoEncoder (AE) using PyTorch - Example with USPS dataset

Опубликовано: 21 Май 2026
на канале: MEDIOCRE_GUY
226
2

USPS dataset consists of digit images of very low resolution (16 x 16 spatial size). In this video, I tried to reconstruct the original USPS images using an AutoEncoder (AE). I used PyTorch as the deep learning framework and Jupyter Notebook for writing code in Python programming language.

In AE, there are two basic building blocks: encoder and decoder. Encoder learns the mapping between input and latent representation. Latent representation is also called bottleneck. Features in the bottleneck are provided as input to the decoder and from those features, the decoder tries to reconstruct the input. AutoEncoder models are usually trained with Mean Squared Error (MSE), which is the loss function for calculating the reconstruction loss. The lower the value of reconstruction loss, the better the chance is for the model to perform well.

00:39 - 𝑰𝒎𝒑𝒐𝒓𝒕 𝒕𝒉𝒆 𝒍𝒊𝒃𝒓𝒂𝒓𝒊𝒆𝒔
02:11 - 𝑫𝒆𝒇𝒊𝒏𝒆 𝒕𝒉𝒆 𝒅𝒆𝒗𝒊𝒄𝒆
04:32 - 𝑳𝒐𝒂𝒅 𝑼𝑺𝑷𝑺 𝒅𝒂𝒕𝒂𝒔𝒆𝒕
07:56 - 𝑫𝒆𝒇𝒊𝒏𝒆 𝒅𝒂𝒕𝒂𝒍𝒐𝒂𝒅𝒆𝒓𝒔
09:12 - 𝑫𝒆𝒇𝒊𝒏𝒆 𝒕𝒉𝒆 𝒏𝒆𝒕𝒘𝒐𝒓𝒌 𝒂𝒓𝒄𝒉𝒊𝒕𝒆𝒄𝒕𝒖𝒓𝒆
16:11 - 𝑽𝒊𝒔𝒖𝒂𝒍𝒊𝒛𝒆 𝒕𝒉𝒆 𝒎𝒐𝒅𝒆𝒍 𝒂𝒓𝒄𝒉𝒊𝒕𝒆𝒄𝒕𝒖𝒓𝒆
17:32 - 𝑻𝒓𝒂𝒊𝒏 𝒃𝒂𝒕𝒄𝒉
19:25 - 𝑻𝒆𝒔𝒕 𝒃𝒂𝒕𝒄𝒉
21:20 - 𝑺𝒆𝒕 𝒖𝒑 𝒎𝒐𝒅𝒆𝒍 (𝑨𝑬), 𝒄𝒓𝒊𝒕𝒆𝒓𝒊𝒐𝒏 (𝒍𝒐𝒔𝒔 𝒇𝒖𝒏𝒄𝒕𝒊𝒐𝒏) 𝒂𝒏𝒅 𝒐𝒑𝒕𝒊𝒎𝒊𝒛𝒆𝒓
22:15 - 𝑻𝒓𝒂𝒊𝒏 𝒕𝒉𝒆 𝒎𝒐𝒅𝒆𝒍
28:52 - 𝑷𝒍𝒐𝒕 𝒎𝒐𝒅𝒆𝒍 𝒍𝒐𝒔𝒔
31:00 - 𝑴𝒐𝒅𝒆𝒍 𝒑𝒓𝒆𝒅𝒊𝒄𝒕𝒊𝒐𝒏

GitHub address: https://github.com/randomaccess2023/M...

Check out this link for theoretical information on autoencoders: https://en.wikipedia.org/wiki/Autoenc...

#deep_learning #data_science #pytorch #unsupervised_learning #autoencoder #jupyter_notebook #usps_dataset