class_docstr: Basic block for ResNet50_vd.
class_docstr_tok: ["Basic","block","for","ResNet50_vd","."]
code: def __init__(
      self,
      num_channels: int,
      num_filters: int,
      stride: int,
      shortcut: bool = True,
      if_first: bool = False,
      name: str = None,
  ):
      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",
      )
      self.conv1 = ConvBNLayer(
          num_channels=num_filters,
          num_filters=num_filters,
          filter_size=3,
          act=None,
          name=name + "_branch2b",
      )
  
      if not shortcut:
          self.short = ConvBNLayer(
              num_channels=num_channels,
              num_filters=num_filters,
              filter_size=1,
              stride=1,
              is_vd_mode=False if if_first else True,
              name=name + "_branch1",
          )
  
      self.shortcut = shortcut
  
imports: import os
  import math
  import numpy
  import paddle
  from paddle import ParamAttr
  import paddle.nn
  from paddle.nn import Conv2d, BatchNorm, Linear, Dropout
  from paddle.nn import AdaptiveAvgPool2d, MaxPool2d, AvgPool2d
  from paddle.nn.initializer import Uniform
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.cv_module import ImageClassifierModule
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, if_first, name)