class_docstr: RegNet model.
  
  Paper: https://arxiv.org/abs/2003.13678
  Original Impl: https://github.com/facebookresearch/pycls/blob/master/pycls/models/regnet.py
  and refer to: https://github.com/rwightman/pytorch-image-models/blob/master/timm/models/regnet.py
class_docstr_tok: ["RegNet","model",".","Paper",":","https",":","\/\/arxiv.org\/abs\/2003.13678","Original","Impl",":","https",":","\/\/github.com\/facebookresearch\/pycls\/blob\/master\/pycls\/models\/regnet.py","and","refer","to",":","https",":","\/\/github.com\/rwightman\/pytorch-image-models\/blob\/master\/timm\/models\/regnet.py"]
code: def __init__(
      self,
      cfg: dict,
      in_c: int = 3,
      num_classes: int = 1000,
      zero_init_last_bn: bool = True,
  ):
      super(RegNet, self).__init__()
  
      # RegStem
      stem_c = cfg["stem_width"]
      self.stem = ConvBNAct(
          in_c, out_c=stem_c, kernel_s=3, stride=2, padding=1
      )
  
      # build stages
      input_channels = stem_c
      stage_info = self._build_stage_info(cfg)
      for i, stage_args in enumerate(stage_info):
          stage_name = "s{}".format(i + 1)
          self.add_module(
              stage_name, RegStage(in_c=input_channels, **stage_args)
          )
          input_channels = stage_args["out_c"]
  
      # RegHead
      self.head = RegHead(in_unit=input_channels, out_unit=num_classes)
  
      # initial weights
      for m in self.modules():
          if isinstance(m, nn.Conv2d):
              nn.init.kaiming_uniform_(
                  m.weight, mode="fan_out", nonlinearity="relu"
              )
          elif isinstance(m, nn.BatchNorm2d):
              nn.init.ones_(m.weight)
              nn.init.zeros_(m.bias)
          elif isinstance(m, nn.Linear):
              nn.init.normal_(m.weight, mean=0.0, std=0.01)
              nn.init.zeros_(m.bias)
  
      if zero_init_last_bn:
          for m in self.modules():
              if hasattr(m, "zero_init_last_bn"):
                  m.zero_init_last_bn()
  
imports: from typing import Optional
  import numpy
  import torch
  import torch.nn
  from torch import Tensor
label_desc: Use image node_id 1 to create a new RegNet object from inherited base classes: nn with example: obj = RegNet(cfg, in_c, num_classes, zero_init_last_bn)