class_docstr: DarkNet, see https://pjreddie.com/darknet/yolo/
  Args:
      depth (int): network depth, currently only darknet 53 is supported
      norm_type (str): normalization type, 'bn' and 'sync_bn' are supported
      norm_decay (float): weight decay for normalization layer weights
      get_prediction (bool): whether to get prediction
      class_dim (int): number of class while classification
docstr: Get the backbone of DarkNet, that is output for the 5 stages.
  
  :param input: Variable of input image
  :type input: Variable
  :Returns: The last variables of each stage.
docstr_tok: ["Get","the","backbone","of","DarkNet",",","that","is","output","for","the","5","stages",".",":","param","input",":","Variable","of","input","image",":","type","input",":","Variable",":","Returns",":","The","last","variables","of","each","stage","."]
code: def __call__(self, input):
      """Get the backbone of DarkNet, that is output for the 5 stages.
  
      :param input: Variable of input image
      :type input: Variable
      :Returns: The last variables of each stage.
      """
      stages, block_func = self.depth_cfg[self.depth]
      stages = stages[0:5]
      conv = self._conv_norm(
          input=input,
          ch_out=32,
          filter_size=3,
          stride=1,
          padding=1,
          name=self.prefix_name + "yolo_input",
      )
      downsample_ = self._downsample(
          input=conv,
          ch_out=conv.shape[1] * 2,
          name=self.prefix_name + "yolo_input.downsample",
      )
      blocks = []
      for i, stage in enumerate(stages):
          block = self.layer_warp(
              block_func=block_func,
              input=downsample_,
              ch_out=32 * 2**i,
              count=stage,
              name=self.prefix_name + "stage.{}".format(i),
          )
          blocks.append(block)
          if i < len(stages) - 1:  # do not downsaple in the last stage
              downsample_ = self._downsample(
                  input=block,
                  ch_out=block.shape[1] * 2,
                  name=self.prefix_name
                  + "stage.{}.downsample".format(i),
              )
      if self.get_prediction:
          pool = fluid.layers.pool2d(
              input=block, pool_type="avg", global_pooling=True
          )
          stdv = 1.0 / math.sqrt(pool.shape[1] * 1.0)
          out = fluid.layers.fc(
              input=pool,
              size=self.class_dim,
              param_attr=ParamAttr(
                  initializer=fluid.initializer.Uniform(-stdv, stdv),
                  name="fc_weights",
              ),
              bias_attr=ParamAttr(name="fc_offset"),
          )
          out = fluid.layers.softmax(out)
          return out
      else:
          return blocks
  
file_path: PaddleHub/modules/image/classification/darknet53_imagenet/darknet.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import six
  import math
  from paddle import fluid
  from paddle.fluid.param_attr import ParamAttr
  from paddle.fluid.regularizer import L2Decay
label_desc: Use image node_id 6 for calling the DarkNet obj's underlying member method code with example usage: obj.__call__(input) and returns: out, blocks