code: def __init__(
      self,
      anchors: Union[List[int], Tuple[int, ...]],
      num_classes: int = 80,
      device: str = "cpu",
  ):
      super().__init__()
  
      # Network Layers
      self.conv1 = ConvLayer(3, 32)
      self.conv2 = ConvLayer(32, 64, stride=2)
      self.conv3 = ConvLayer(64, 32, 1, 1)
      self.conv4 = ConvLayer(32, 64)
      # self.__shortcut_layer1(self.conv4, self.conv2)
      self.conv5 = ConvLayer(64, 128, stride=2)
      self.conv6 = ConvLayer(128, 64, 1, 1)
      self.conv7 = ConvLayer(64, 128, stride=1)
      # self.__shortcut_layer2(self.conv7, self.conv5)
      self.conv8 = ConvLayer(128, 64, 1, 1)
      self.conv9 = ConvLayer(64, 128, stride=1)
      # self.__shortcut_layer3(self.conv9, shortcut2)
      self.conv10 = ConvLayer(128, 256, stride=2)
      self.conv11 = ConvLayer(256, 128, 1, 1)
      self.conv12 = ConvLayer(128, 256)
      # self.__shortcut_layer4(self.con12, self.conv10)
      self.conv13 = ConvLayer(256, 128, 1, 1)
      self.conv14 = ConvLayer(128, 256)
      # self.__shortcut_layer5(self.conv14, shortcut4)
      self.conv15 = ConvLayer(256, 128, 1, 1)
      self.conv16 = ConvLayer(128, 256)
      # self.__shortcut_layer6(self.conv16, shortcut5)
      self.conv17 = ConvLayer(256, 128, 1, 1)
      self.conv18 = ConvLayer(128, 256)
      # self.__shortcut_layer7(self.conv18, shortcut6)
      self.conv19 = ConvLayer(256, 128, 1, 1)
      self.conv20 = ConvLayer(128, 256)
      # self.__shortcut_layer8(self.conv20, shortcut7)
      self.conv21 = ConvLayer(256, 128, 1, 1)
      self.conv22 = ConvLayer(128, 256)
      # self.__shortcut_layer9(self.conv22, shortcut8)
      self.conv23 = ConvLayer(256, 128, 1, 1)
      self.conv24 = ConvLayer(128, 256)
      # self.__shortcut_layer10(self.conv24, shortcut9)
      self.conv25 = ConvLayer(256, 128, 1, 1)
      self.conv26 = ConvLayer(128, 256)
      # self.__shortcut_layer11(self.conv26, shortcut10)
      self.conv27 = ConvLayer(256, 512, stride=2)
      self.conv28 = ConvLayer(512, 256, 1, 1)
      self.conv29 = ConvLayer(256, 512)
      # self.__shortcut_layer12(self.conv29, self.conv27)
      self.conv30 = ConvLayer(512, 256, 1, 1)
      self.conv31 = ConvLayer(256, 512)
      # self.__shortcut_layer13(self.conv31, shortcut12)
      self.conv32 = ConvLayer(512, 256, 1, 1)
      self.conv33 = ConvLayer(256, 512)
      # self.__shortcut_layer14(self.conv33, shortcut13)
      self.conv34 = ConvLayer(512, 256, 1, 1)
      self.conv35 = ConvLayer(256, 512)
      # self.__shortcut_layer15(self.conv35, shortcut14)
      self.conv36 = ConvLayer(512, 256, 1, 1)
      self.conv37 = ConvLayer(256, 512)
      # self.__shortcut_layer16(self.conv37, shortcut15)
      self.conv38 = ConvLayer(512, 256, 1, 1)
      self.conv39 = ConvLayer(256, 512)
      # self.__shortcut_layer17(self.conv39, shortcut16)
      self.conv40 = ConvLayer(512, 256, 1, 1)
      self.conv41 = ConvLayer(256, 512)
      # self.__shortcut_layer18(self.conv41, shortcut17)
      self.conv42 = ConvLayer(512, 256, 1, 1)
      self.conv43 = ConvLayer(256, 512)
      # self.__shortcut_layer19(self.conv43, shortcut18)
      self.conv44 = ConvLayer(512, 1024, stride=2)
      self.conv45 = ConvLayer(1024, 512, 1, 1)
      self.conv46 = ConvLayer(512, 1024)
      # self.__shortcut_layer20(self.conv46, self.conv44)
      self.conv47 = ConvLayer(1024, 512, 1, 1)
      self.conv48 = ConvLayer(512, 1024)
      # self.__shortcut_layer21(self.conv48, shortcut20)
      self.conv49 = ConvLayer(1024, 512, 1, 1)
      self.conv50 = ConvLayer(512, 1024)
      # self.__shortcut_layer22(self.conv50, shortcut21)
      self.conv51 = ConvLayer(1024, 512, 1, 1)
      self.conv52 = ConvLayer(512, 1024)
      # self.__shortcut_layer23(self.conv52, shortcut22)
      self.conv53 = ConvLayer(1024, 512, 1, 1)
      self.conv54 = ConvLayer(512, 1024)
      self.conv55 = ConvLayer(1024, 512, 1, 1)
      self.conv56 = ConvLayer(512, 1024)
      self.conv57 = ConvLayer(1024, 512, 1, 1)
      self.conv58 = ConvLayer(512, 1024)
      self.conv59 = ConvLayer(
          1024,
          (3 * (5 + num_classes)),
          1,
          1,
          use_batch_norm=False,
          activation="linear",
      )
  
      # yolo layer
      self.yolo1 = DetectionLayer(
          num_classes=num_classes,
          anchors=anchors,
          anchor_masks=(6, 7, 8),
          device=device,
          layer=1,
      )
  
      # self.__route_layer(self.conv57)
      self.conv60 = ConvLayer(512, 256, 1, 1)
      self.upsample1 = nn.Upsample(
          scale_factor=2,
          mode="nearest"
          # align_corners=True
      )
      # self.__route_layer(self.upsample1, shortcut19)
      self.conv61 = ConvLayer(768, 256, 1, 1)
      self.conv62 = ConvLayer(256, 512)
      self.conv63 = ConvLayer(512, 256, 1, 1)
      self.conv64 = ConvLayer(256, 512)
      self.conv65 = ConvLayer(512, 256, 1, 1)
      self.conv66 = ConvLayer(256, 512)
      self.conv67 = ConvLayer(
          512,
          (3 * (5 + num_classes)),
          1,
          1,
          use_batch_norm=False,
          activation="linear",
      )
  
      # yolo layer
      self.yolo2 = DetectionLayer(
          num_classes=num_classes,
          anchors=anchors,
          anchor_masks=(3, 4, 5),
          device=device,
          layer=2,
      )
  
      # self.__route_layer(self.conv65)
      self.conv68 = ConvLayer(256, 128, 1, 1)
      self.upsample2 = nn.Upsample(
          scale_factor=2,
          mode="nearest"
          # align_corners=True
      )
      # self.__route_layer(self.upsample2, shortcut11)
  
      self.conv69 = ConvLayer(384, 128, 1, 1)
      self.conv70 = ConvLayer(128, 256)
      self.conv71 = ConvLayer(256, 128, 1, 1)
      self.conv72 = ConvLayer(128, 256)
      self.conv73 = ConvLayer(256, 128, 1, 1)
      self.conv74 = ConvLayer(128, 256)
      self.conv75 = ConvLayer(
          256,
          (3 * (5 + num_classes)),
          1,
          1,
          use_batch_norm=False,
          activation="linear",
      )
  
      # yolo layer
      self.yolo3 = DetectionLayer(
          num_classes=num_classes,
          anchors=anchors,
          anchor_masks=(0, 1, 2),
          device=device,
          layer=3,
      )
  
imports: from typing import Union, List, Tuple, Optional
  import torch
  import torch.nn
  import numpy
  from .utils import transform_prediction
label_desc: Use image node_id 1 to create a new YoloV3 object from inherited base classes: nn with example: obj = YoloV3(anchors, num_classes, device)