code: def rename_BatchNormalization(self, source_node):
      IR_node = self.IR_graph.node.add()
  
      # name, op
      PaddleParser._copy_and_reop(source_node, IR_node, "BatchNorm")
  
      # input edge
      self.convert_inedge(source_node, IR_node)
  
      # layer and spec
      bn_spec = source_node.layer
  
      # output shape
      if bn_spec.inputs[0].HasField("image_conf"):
          img_conf = bn_spec.inputs[0].image_conf
          output_x = img_conf.img_size
          output_y = (
              img_conf.img_size_y
              if img_conf.HasField("img_size_y")
              else output_x
          )
          outputchannel = img_conf.channels
  
          output_shapes = [-1, output_y, output_x, outputchannel]
          self.shape_dict[source_node.name] = output_shapes
          PaddleParser._set_output_shape(
              source_node, IR_node, output_shapes
          )
  
      IR_node.attr["scale"].b = True
      IR_node.attr["bias"].b = bn_spec.HasField("bias_parameter_name")
  
      w_name = bn_spec.inputs[0].input_parameter_name
      mean_name = bn_spec.inputs[1].input_parameter_name
      var_name = bn_spec.inputs[2].input_parameter_name
      bias_name = bn_spec.bias_parameter_name
  
      gamma = self.parameters.get(w_name)
      mean = self.parameters.get(mean_name)
      variance = self.parameters.get(var_name)
      beta = self.parameters.get(bias_name)
  
      # channels_first, then axis = 1
      IR_node.attr["axis"].i = -1
  
      # epsilon
      IR_node.attr["epsilon"].f = bn_spec.epsilon
  
      # compute adjusted parameters
      # Reference: parameter transformation https://github.com/apple/coremltools/issues/153
      f = 1.0 / np.sqrt(variance + bn_spec.epsilon)
      gamma1 = gamma * f
      beta1 = beta - gamma * mean * f
      mean[:] = 0.0  # mean
      variance[:] = 1.0 - 0.00001  # stddev
  
      # convert type because of tensorflow
      gamma1 = gamma1.astype(np.float32)
      beta1 = beta1.astype(np.float32)
      mean = mean.astype(np.float32)
      variance = variance.astype(np.float32)
  
      # flatten
      gamma1 = gamma1.flatten()
      beta1 = beta1.flatten()
      mean = mean.flatten()
      variance = variance.flatten()
  
      if IR_node.attr["scale"].b:
          self.set_weight(IR_node.name, "scale", gamma1)
  
      if IR_node.attr["bias"].b:
          self.set_weight(IR_node.name, "bias", beta1)
  
      # mean
      self.set_weight(IR_node.name, "mean", mean)
  
      # var
      self.set_weight(IR_node.name, "var", variance)
  
      # defuse the activation layer
  
      if bn_spec.HasField("active_type") and bn_spec.active_type != "":
          IR_node_act = self._defuse_activation(source_node)
          if bn_spec.inputs[0].HasField("image_conf"):
              PaddleParser._set_output_shape(
                  source_node, IR_node_act, output_shapes
              )
  
imports: from __future__ import absolute_import
  import os
  import gzip
  from six import string_types
  import paddle.v2
  import paddle.trainer_config_helpers.layers
  import numpy
  from mmdnn.conversion.paddle.paddle_graph import PaddleGraph
  import mmdnn.conversion.common.IR.graph_pb2
  from mmdnn.conversion.common.IR.graph_pb2 import NodeDef, GraphDef, DataType
  from mmdnn.conversion.common.DataStructure.parser import Parser
  from mmdnn.conversion.common.utils import *
label_desc: Use image node_id 13 for calling the PaddleParser obj's underlying member method code with example usage: obj.rename_BatchNormalization(source_node) without return types