code: def __init__(
      self,
      small=False,
      num_init_features=64,
      k_r=96,
      groups=32,
      b=False,
      k_sec=(3, 4, 20, 3),
      inc_sec=(16, 32, 24, 128),
      num_classes=1000,
      test_time_pool=False,
  ):
      super(DPN, self).__init__()
      self.test_time_pool = test_time_pool
      self.b = b
      bw_factor = 1 if small else 4
  
      blocks = OrderedDict()
  
      # conv1
      if small:
          blocks["conv1_1"] = InputBlock(
              num_init_features, kernel_size=3, padding=1
          )
      else:
          blocks["conv1_1"] = InputBlock(
              num_init_features, kernel_size=7, padding=3
          )
  
      # conv2
      bw = 64 * bw_factor
      inc = inc_sec[0]
      r = (k_r * bw) // (64 * bw_factor)
      blocks["conv2_1"] = DualPathBlock(
          num_init_features, r, r, bw, inc, groups, "proj", b
      )
      in_chs = bw + 3 * inc
      for i in range(2, k_sec[0] + 1):
          blocks["conv2_" + str(i)] = DualPathBlock(
              in_chs, r, r, bw, inc, groups, "normal", b
          )
          in_chs += inc
  
      # conv3
      bw = 128 * bw_factor
      inc = inc_sec[1]
      r = (k_r * bw) // (64 * bw_factor)
      blocks["conv3_1"] = DualPathBlock(
          in_chs, r, r, bw, inc, groups, "down", b
      )
      in_chs = bw + 3 * inc
      for i in range(2, k_sec[1] + 1):
          blocks["conv3_" + str(i)] = DualPathBlock(
              in_chs, r, r, bw, inc, groups, "normal", b
          )
          in_chs += inc
  
      # conv4
      bw = 256 * bw_factor
      inc = inc_sec[2]
      r = (k_r * bw) // (64 * bw_factor)
      blocks["conv4_1"] = DualPathBlock(
          in_chs, r, r, bw, inc, groups, "down", b
      )
      in_chs = bw + 3 * inc
      for i in range(2, k_sec[2] + 1):
          blocks["conv4_" + str(i)] = DualPathBlock(
              in_chs, r, r, bw, inc, groups, "normal", b
          )
          in_chs += inc
  
      # conv5
      bw = 512 * bw_factor
      inc = inc_sec[3]
      r = (k_r * bw) // (64 * bw_factor)
      blocks["conv5_1"] = DualPathBlock(
          in_chs, r, r, bw, inc, groups, "down", b
      )
      in_chs = bw + 3 * inc
      for i in range(2, k_sec[3] + 1):
          blocks["conv5_" + str(i)] = DualPathBlock(
              in_chs, r, r, bw, inc, groups, "normal", b
          )
          in_chs += inc
      blocks["conv5_bn_ac"] = CatBnAct(in_chs)
  
      self.features = nn.Sequential(blocks)
  
      # Using 1x1 conv for the FC layer to allow the extra pooling scheme
      self.last_linear = nn.Conv2d(
          in_chs, num_classes, kernel_size=1, bias=True
      )
  
imports: import os
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils.model_zoo
  from collections import OrderedDict
  from .adaptive_avgmax_pool import adaptive_avgmax_pool2d
  from .convert_from_mxnet import convert_from_mxnet, has_mxnet
label_desc: Use image node_id 1 to create a new DPN object from inherited base classes: nn with example: obj = DPN(small, num_init_features, k_r, groups, b, k_sec, inc_sec, num_classes, test_time_pool)