class_docstr: This class implements `MobileOne architecture <https://arxiv.org/pdf/2206.04040.pdf>`_
docstr: Build a stage of MobileOne model.
  
  Args:
      planes: Number of output channels.
      num_blocks: Number of blocks in this stage.
      num_se_blocks: Number of SE blocks in this stage.
  
  Returns:
      A stage of MobileOne model.
docstr_tok: ["Build","a","stage","of","MobileOne","model",".","Args",":","planes",":","Number","of","output","channels",".","num_blocks",":","Number","of","blocks","in","this","stage",".","num_se_blocks",":","Number","of","SE","blocks","in","this","stage",".","Returns",":","A","stage","of","MobileOne","model","."]
code: def _make_stage(
      self, planes: int, num_blocks: int, num_se_blocks: int
  ) -> nn.Sequential:
      """Build a stage of MobileOne model.
  
      Args:
          planes: Number of output channels.
          num_blocks: Number of blocks in this stage.
          num_se_blocks: Number of SE blocks in this stage.
  
      Returns:
          A stage of MobileOne model.
      """
      # Get strides for all layers
      strides = [2] + [1] * (num_blocks - 1)
      blocks = []
      for ix, stride in enumerate(strides):
          use_se = False
          if num_se_blocks > num_blocks:
              raise ValueError(
                  f"Number of SE blocks ({num_se_blocks}) cannot exceed number of layers ({num_blocks})."
              )
          if ix >= (num_blocks - num_se_blocks):
              use_se = True
  
          # MobileOne block with depthwise conv
          blocks.append(
              MobileOneBlock(
                  self.opts,
                  in_channels=self.in_planes,
                  out_channels=self.in_planes,
                  kernel_size=3,
                  stride=stride,
                  padding=1,
                  groups=self.in_planes,
                  inference_mode=self.inference_mode,
                  use_se=use_se,
                  num_conv_branches=self.num_conv_branches,
              )
          )
          # MobileOne block with pointwise conv
          blocks.append(
              MobileOneBlock(
                  self.opts,
                  in_channels=self.in_planes,
                  out_channels=planes,
                  kernel_size=1,
                  stride=1,
                  padding=0,
                  groups=1,
                  inference_mode=self.inference_mode,
                  use_se=use_se,
                  num_conv_branches=self.num_conv_branches,
              )
          )
          self.in_planes = planes
          self.cur_layer_idx += 1
      return nn.Sequential(*blocks)
  
file_path: ml-cvnets/cvnets/models/classification/mobileone.py
imports: import argparse
  import copy
  import torch.nn
  from cvnets.layers import GlobalPool, Identity, LinearLayer
  from cvnets.models import MODEL_REGISTRY
  from cvnets.models.classification.base_image_encoder import BaseImageEncoder
  from cvnets.models.classification.config.mobileone import get_configuration
  from cvnets.modules.mobileone_block import MobileOneBlock
label_desc: Use image node_id 3 for calling the MobileOne obj's underlying member method code with example usage: obj._make_stage(planes, num_blocks, num_se_blocks) and returns: nn