Classify CIFAR10 images using pretrained AlexNet with PyTorch

Опубликовано: 16 Июнь 2026
на канале: MEDIOCRE_GUY
796
7

Transfer learning is a type of technique in computer vision that focuses on using gained knowledge from one domain and applying it to a different domain but related problem. For example, knowledge gained while distinguishing between cat and dog images can be applied to differentiating between bus and truck images. In this video, I used pretrained AlexNet which has been trained on ImageNet images that have 1000 classes and considered a state-of-the-art model to classify CIFAR10 images that have 10 classes. I used PyTorch as the deep learning framework and this powerful library offers us the opportunity to use a significant number of state-of-the-art pretrained models.

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

For more details about transfer learning: https://en.wikipedia.org/wiki/Transfe...

Starting point for each section:
01:13 --- Import the required libraries
04:04 --- Define the device
05:53 --- Apply transformation
08:28 --- Load CIFAR10 dataset
16:38 --- Define dataloaders
18:51 --- The pretrained network (AlexNet) architecture
19:55 --- Visualize the pretrained model (AlexNet) architecture
22:38 --- Modified pretrained network (modified_AlexNet) architecture for CIFAR10 images
28:19 --- Visualize the modified pretrained model (modified_AlexNet) architecture
30:23 --- Define the train batch
32:01 --- Define the test batch
33:09 --- Define the accuracy function
35:22 --- Set up model_to_train (modified_AlexNet), criterion (loss function) and optimizer
36:24 --- Train the model
46:13 --- Plot model loss and accuracy
50:45 --- Model prediction

#transfer_learning #cifar10 #pytorch #data_science #jupyter_notebook #image_classification #python #alexnet