docstr: YOLODetBlock layer for yolov3, see https://arxiv.org/abs/1804.02767
  
  Args:
      ch_in (int): input channel
      channel (int): base channel
      norm_type (str): batch norm type
      freeze_norm (bool): whether to freeze norm, default False
      name (str): layer name
      data_format (str): data format, NCHW or NHWC
docstr_tok: ["YOLODetBlock","layer","for","yolov3",",","see","https",":","\/\/arxiv.org\/abs\/1804.02767","Args",":","ch_in","(","int",")",":","input","channel","channel","(","int",")",":","base","channel","norm_type","(","str",")",":","batch","norm","type","freeze_norm","(","bool",")",":","whether","to","freeze","norm",",","default","False","name","(","str",")",":","layer","name","data_format","(","str",")",":","data","format",",","NCHW","or","NHWC"]
code: def __init__(
      self,
      ch_in,
      channel,
      norm_type,
      freeze_norm=False,
      name="",
      data_format="NCHW",
  ):
      """
      YOLODetBlock layer for yolov3, see https://arxiv.org/abs/1804.02767
  
      Args:
          ch_in (int): input channel
          channel (int): base channel
          norm_type (str): batch norm type
          freeze_norm (bool): whether to freeze norm, default False
          name (str): layer name
          data_format (str): data format, NCHW or NHWC
      """
      super(YoloDetBlock, self).__init__()
      self.ch_in = ch_in
      self.channel = channel
      assert (
          channel % 2 == 0
      ), "channel {} cannot be divided by 2".format(channel)
      conv_def = [
          ["conv0", ch_in, channel, 1, ".0.0"],
          ["conv1", channel, channel * 2, 3, ".0.1"],
          ["conv2", channel * 2, channel, 1, ".1.0"],
          ["conv3", channel, channel * 2, 3, ".1.1"],
          ["route", channel * 2, channel, 1, ".2"],
      ]
  
      self.conv_module = nn.Sequential()
      for idx, (
          conv_name,
          ch_in,
          ch_out,
          filter_size,
          post_name,
      ) in enumerate(conv_def):
          self.conv_module.add_sublayer(
              conv_name,
              ConvBNLayer(
                  ch_in=ch_in,
                  ch_out=ch_out,
                  filter_size=filter_size,
                  padding=(filter_size - 1) // 2,
                  norm_type=norm_type,
                  freeze_norm=freeze_norm,
                  data_format=data_format,
                  name=name + post_name,
              ),
          )
  
      self.tip = ConvBNLayer(
          ch_in=channel,
          ch_out=channel * 2,
          filter_size=3,
          padding=1,
          norm_type=norm_type,
          freeze_norm=freeze_norm,
          data_format=data_format,
          name=name + ".tip",
      )
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register, serializable
  from ppdet.modeling.layers import DropBlock
  from ppdet.modeling.ops import get_act_fn
  from ..backbones.darknet import ConvBNLayer
  from ..shape_spec import ShapeSpec
  from ..backbones.csp_darknet import BaseConv, DWConv, CSPLayer
label_desc: Use image node_id 1 to create a new YoloDetBlock object from inherited base classes: nn with example: obj = YoloDetBlock(ch_in, channel, norm_type, freeze_norm, name, data_format)