class_docstr: ## ConvMixer
  
  This combines the patch embeddings block, a number of ConvMixer layers and a classification head.
class_docstr_tok: ["#","#","ConvMixer","This","combines","the","patch","embeddings","block",",","a","number","of","ConvMixer","layers","and","a","classification","head","."]
docstr: * `x` is the input image of shape `[batch_size, channels, height, width]`
docstr_tok: ["*","`","x","`","is","the","input","image","of","shape","`","[","batch_size",",","channels",",","height",",","width","]","`"]
code: def forward(self, x: torch.Tensor):
      """
      * `x` is the input image of shape `[batch_size, channels, height, width]`
      """
      # Get patch embeddings. This gives a tensor of shape `[batch_size, d_model, height / patch_size, width / patch_size]`.
      x = self.patch_emb(x)
  
      # Pass through [ConvMixer layers](#ConvMixerLayer)
      for layer in self.conv_mixer_layers:
          x = layer(x)
  
      # Classification head, to get logits
      x = self.classification(x)
  
      #
      return x
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/conv_mixer/__init__.py
imports: import torch
  from torch import nn
  from labml_helpers.module import Module
  from labml_nn.utils import clone_module_list
label_desc: Use image node_id 2 for calling the ConvMixer obj's underlying member method code with example usage: obj.forward(x) and returns: x