code: def conv_bn_layer(
      self,
      input,
      num_filters,
      filter_size,
      stride=1,
      groups=1,
      act=None,
  ):
      param_name = "conv2d_" + str(self.cur_layers)
      conv = fluid.layers.conv2d(
          input=input,
          num_filters=num_filters,
          filter_size=filter_size,
          stride=stride,
          padding=int(old_div((filter_size - 1), 2)),
          groups=groups,
          param_attr=fluid.ParamAttr(name=param_name + ".w" + "_0"),
          act=None,
          bias_attr=False,
      )
      # print(conv)
      ###original BN op
      # conv_bn = fluid.layers.batch_norm(input=conv, act=act)
  
      ###replace BN op with batch_norm formula
      #
      # bn_tmp = (x - p_mean)/ sqrt(p_variance + const)
      # conv_x = bn_tmp * p_scale + p_bias
      #
      p_scale, p_bias, p_mean, p_variance = create_parameter(
          self.cur_layers, conv.shape[1], conv.dtype
      )
      bn_tmp1 = paddle.fluid.layers.elementwise_sub(
          conv, p_mean, axis=1
      )
      bn_tmp2 = paddle.fluid.layers.sqrt(p_variance)
      bn_tmp3 = paddle.fluid.layers.elementwise_div(
          bn_tmp1, bn_tmp2, axis=1
      )
      bn_tmp4 = paddle.fluid.layers.elementwise_mul(
          bn_tmp3, p_scale, axis=1
      )
      conv_x = paddle.fluid.layers.elementwise_add(
          bn_tmp4, p_bias, axis=1
      )
  
      if "relu" == act:
          conv_bn = fluid.layers.relu(conv_x)
      else:
          conv_bn = conv_x
  
      self.cur_layers += 1
  
      return conv_bn
  
imports: from __future__ import division
  from builtins import str
  from builtins import range
  from builtins import object
  from past.utils import old_div
  import paddle
  import paddle.fluid
  import math
  from paddle.fluid.layer_helper import LayerHelper
  from paddle.fluid.param_attr import ParamAttr
  from paddle.fluid.initializer import Constant
label_desc: Use image node_id 4 for calling the ResNet obj's underlying member method code with example usage: obj.conv_bn_layer(input, num_filters, filter_size, stride, groups, act) and returns: conv_bn