class_docstr: ### VGG model for CIFAR-10 classification
class_docstr_tok: ["#","#","#","VGG","model","for","CIFAR-10","classification"]
code: def __init__(self, blocks: List[List[int]]):
      super().__init__()
  
      # 5 $2 \times 2$ pooling layers will produce a output of size $1 \ times 1$.
      # CIFAR 10 image size is $32 \times 32$
      assert len(blocks) == 5
      layers = []
      # RGB channels
      in_channels = 3
      # Number of channels in each layer in each block
      for block in blocks:
          # Convolution, Normalization and Activation layers
          for channels in block:
              layers += self.conv_block(in_channels, channels)
              in_channels = channels
          # Max pooling at end of each block
          layers += [nn.MaxPool2d(kernel_size=2, stride=2)]
  
      # Create a sequential model with the layers
      self.layers = nn.Sequential(*layers)
      # Final logits layer
      self.fc = nn.Linear(in_channels, 10)
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/experiments/cifar10.py
imports: from typing import List
  import torch.nn
  from labml import lab
  from labml.configs import option
  from labml_helpers.datasets.cifar10 import CIFAR10Configs
  from labml_helpers.module import Module
  from labml_nn.experiments.mnist import MNISTConfigs
label_desc: Use image node_id 2 to create a new CIFAR10VGGModel object from inherited base classes: Module with example: obj = CIFAR10VGGModel(blocks)