code: def get_configuration(
      opts: argparse.Namespace,
  ) -> Dict[str, Dict[str, Union[int, float]]]:
      """Gets the RegNet model configuration for the specified RegNet mode.
  
      Args:
          opts: command-line arguments
  
      Returns:
          * A dictionary containing the configuration for each layer. Each key is of the form
              layer<i> and the corresponding value is another dictionary with the following keys:
                  depth: The depth of the stage at layer<i>
                  width: The width of the blocks at this stage
                  groups: The convolution groups of each block at this stage
                  stride: The stride of the convolutions in each block at this stage
                  bottleneck_multiplier: The multiplier for the bottleneck conv in each of this stage's blocks
                  se_ratio: The squeeze-excitation ratio for each block in this stage
      """
      network_mode = getattr(opts, "model.classification.regnet.mode")
  
      if network_mode is None:
          logger.error(
              "RegNet mode can't be none. Please specify --model.classification.regnet.mode"
          )
  
      network_config = dict()
  
      block_params_config = {
          "x_200mf": BlockParamsConfig(13, 24, 36.44, 2.49, 8),
          "x_400mf": BlockParamsConfig(22, 24, 24.48, 2.54, 16),
          "x_600mf": BlockParamsConfig(16, 48, 36.97, 2.24, 24),
          "x_800mf": BlockParamsConfig(16, 56, 35.73, 2.28, 16),
          "x_1.6gf": BlockParamsConfig(18, 80, 34.01, 2.25, 24),
          "x_3.2gf": BlockParamsConfig(25, 88, 26.31, 2.25, 48),
          "x_4.0gf": BlockParamsConfig(23, 96, 38.65, 2.43, 40),
          "x_6.4gf": BlockParamsConfig(17, 184, 60.83, 2.07, 56),
          "x_8.0gf": BlockParamsConfig(23, 80, 49.56, 2.88, 120),
          "x_12gf": BlockParamsConfig(19, 168, 73.36, 2.37, 112),
          "x_16gf": BlockParamsConfig(22, 216, 55.59, 2.1, 128),
          "x_32gf": BlockParamsConfig(23, 320, 69.86, 2.0, 168),
          "y_200mf": BlockParamsConfig(
              13, 24, 36.44, 2.49, 8, se_ratio=0.25
          ),
          "y_400mf": BlockParamsConfig(
              16, 48, 27.89, 2.09, 8, se_ratio=0.25
          ),
          "y_600mf": BlockParamsConfig(
              15, 48, 32.54, 2.32, 16, se_ratio=0.25
          ),
          "y_800mf": BlockParamsConfig(
              14, 56, 38.84, 2.4, 16, se_ratio=0.25
          ),
          "y_1.6gf": BlockParamsConfig(
              27, 48, 20.71, 2.65, 24, se_ratio=0.25
          ),
          "y_3.2gf": BlockParamsConfig(
              21, 80, 42.63, 2.66, 24, se_ratio=0.25
          ),
          "y_4.0gf": BlockParamsConfig(
              22, 96, 31.41, 2.24, 64, se_ratio=0.25
          ),
          "y_6.4gf": BlockParamsConfig(
              25, 112, 33.22, 2.27, 72, se_ratio=0.25
          ),
          "y_8.0gf": BlockParamsConfig(
              17, 192, 76.82, 2.19, 56, se_ratio=0.25
          ),
          "y_12gf": BlockParamsConfig(
              19, 168, 73.36, 2.37, 112, se_ratio=0.25
          ),
          "y_16gf": BlockParamsConfig(
              18, 200, 106.23, 2.48, 112, se_ratio=0.25
          ),
          "y_32gf": BlockParamsConfig(
              20, 232, 115.89, 2.53, 232, se_ratio=0.25
          ),
      }
  
      if network_mode in block_params_config:
          regnet_block_params_cfg = block_params_config[network_mode]
  
          stage_depths = regnet_block_params_cfg.depths
          stage_widths = regnet_block_params_cfg.widths
          stage_groups = regnet_block_params_cfg.stage_groups
          bottleneck_multipliers = (
              regnet_block_params_cfg.bottleneck_multipliers
          )
          strides = regnet_block_params_cfg.strides
          se_ratio = regnet_block_params_cfg.se_ratio
  
          for i, layer_name in enumerate(
              [f"layer{i}" for i in range(1, 5)]
          ):
              network_config[layer_name] = {
                  "depth": stage_depths[i],
                  "width": stage_widths[i],
                  "groups": stage_groups[i],
                  "stride": strides[i],
                  "bottleneck_multiplier": bottleneck_multipliers[i],
                  "se_ratio": se_ratio,
              }
      else:
          logger.error(
              f"Current supported modes for RegNet are {', '.join(supported_modes)}. Got: {network_mode}"
          )
  
      return network_config
  
file_path: ml-cvnets/cvnets/models/classification/config/regnet.py
imports: import argparse
  from dataclasses import dataclass
  from typing import Dict, List, Tuple, Union
  import numpy
  from utils import logger
  from utils.math_utils import make_divisible
label_desc: Use image node_id 1 for calling a global function with example usage: get_configuration(opts) and returns: network_config