code: def __init__(
      self,
      num_channels,
      num_filters,
      stride,
      shortcut=True,
      name=None,
      data_format="NCHW",
  ):
      super(BasicBlock, self).__init__()
      self.stride = stride
      self.conv0 = ConvBNLayer(
          num_channels=num_channels,
          num_filters=num_filters,
          filter_size=3,
          stride=stride,
          act="relu",
          name=name + "_branch2a",
          data_format=data_format,
      )
      self.conv1 = ConvBNLayer(
          num_channels=num_filters,
          num_filters=num_filters,
          filter_size=3,
          act=None,
          name=name + "_branch2b",
          data_format=data_format,
      )
      if not shortcut:
          self.short = ConvBNLayer(
              num_channels=num_channels,
              num_filters=num_filters,
              filter_size=1,
              stride=stride,
              name=name + "_branch1",
              data_format=data_format,
          )
      self.shortcut = shortcut
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import math
  import paddle
  from paddle import ParamAttr
  import paddle.nn
  import paddle.nn.functional
  from paddle.nn.initializer import Normal
label_desc: Use image node_id 1 to create a new BasicBlock object from inherited base classes: nn with example: obj = BasicBlock(num_channels, num_filters, stride, shortcut, name, data_format)