code: def __init__(
      self,
      anchors: Union[List[int], Tuple[int, ...]],
      anchor_masks: Tuple[int, int, int],
      layer: int,
      num_classes: int = 80,
      device: str = "cpu",
  ):
      super().__init__()
      self.height = 416
      self.width = 416
      self.num_classes = num_classes
      self.ignore_thresh = 0.7
      self.truth_thresh = 1
      self.rescore = 1
      self.device = device
      self.anchors = self.__get_anchors(anchors, anchor_masks)
      self.layer = layer
      self.layer_width = None
      self.layer_height = None
      self.layer_output = None
      self.pred = None
      self.stride = None
      self.grid = None
      self.anchor_grid = None
  
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 DetectionLayer object from inherited base classes: nn with example: obj = DetectionLayer(anchors, anchor_masks, layer, num_classes, device)