...

/

Exercise: Build Your Own CNN

Exercise: Build Your Own CNN

Learn to implement a simplified VGG-8 architecture.

Objective

  • Implement a simplified VGG-8 architecture with batch normalization.

  • Load and preprocess an input image.

  • Pass the input image through the CNN and collect intermediate feature maps.

  • Visualize the feature maps of each ReLU layer in the model.

Steps

  • After each Conv2d layer, add the following:

    • A batch normalization layer

    • A ReLU layer

    • A MaxPool2D layer with kernel size and stride = 2

Hints [to build a model from scratch]

  • Refer to the PyTorch documentation for implementing a custom CNN ...