class_docstr: This class stores the quantized linear block params. It is adapted from torchvision.models.regnet:
      https://github.com/pytorch/vision/blob/c06d52b1c5f6aee36802661c3ebc6347b97cc59e/torchvision/models/regnet.py#L203
  
  Args:
      depth: The total number of XBlocks in the network
      w_0: Initial width
      w_a: Width slope
      w_m: Width slope in the log space
      groups: The number of groups to use in the XBlock. Referred to
      se_ratio: The squeeze-excitation ratio. The number of channels in the SE module will be the
          input channels scaled by this ratio.
      bottleneck_multiplier: The number of output channels in the intermediate conv layers in bottleneck/Xblock
          block will be scaled by this value.
      quant: Block widths will be divisible by this value
      stride: The stride of the 3x3 conv of the XBlocks
code: def __init__(
      self,
      depth: int,
      w_0: int,
      w_a: float,
      w_m: float,
      groups: int,
      se_ratio: float = 0.0,
      bottleneck_multiplier: float = 1.0,
      quant: int = 8,
      stride: int = 2,
  ) -> None:
      if w_a < 0 or w_0 <= 0 or w_m <= 1 or w_0 % 8 != 0:
          raise ValueError(
              f"Invalid RegNet settings. Need"
              f" w_a >= 0, given w_a={w_a};"
              f" w_m > 1, given w_m={w_m};"
              f" w_0 > 0 and w_0 % 8 == 0, given w_0={w_0}."
          )
  
      # Continuous widths for each block. Each stage has a unique block width
      block_widths_cont = (
          np.arange(depth) * w_a + w_0
      )  # u_j in eq. (2) of paper
      block_capacity = np.round(
          np.log(block_widths_cont / w_0) / np.log(w_m)
      )  # s_j in eq. (3) of paper
  
      # Quantized block widths
      block_widths_quant = (
          (
              np.round(
                  np.divide(w_0 * np.power(w_m, block_capacity), quant)
              )
              * quant
          )
          .astype(int)
          .tolist()
      )
      num_stages = len(set(block_widths_quant))
  
      # Convert to per stage parameters
      split_helper = zip(
          block_widths_quant + [0],
          [0] + block_widths_quant,
          block_widths_quant + [0],
          [0] + block_widths_quant,
      )
      splits = [w != wp or r != rp for w, wp, r, rp in split_helper]
  
      stage_widths = [
          w for w, t in zip(block_widths_quant, splits[:-1]) if t
      ]
      stage_depths = (
          np.diff([d for d, t in enumerate(splits) if t])
          .astype(int)
          .tolist()
      )
  
      strides = [stride] * num_stages
      bottleneck_multipliers = [bottleneck_multiplier] * num_stages
      stage_groups = [groups] * num_stages
  
      # Adjust the compatibility of stage widths and group widths
      stage_widths, stage_groups = self._make_widths_compatible(
          stage_widths, stage_groups, bottleneck_multipliers
      )
  
      self.depths = stage_depths
      self.widths = stage_widths
      self.stage_groups = stage_groups
      self.bottleneck_multipliers = bottleneck_multipliers
      self.strides = strides
      self.se_ratio = se_ratio
  
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 to create a new BlockParamsConfig object  with example: obj = BlockParamsConfig(depth, w_0, w_a, w_m, groups, se_ratio, bottleneck_multiplier, quant, stride)