code: def add_tensorflow_padding_value(self):
      for op in self._model.op:
          padding_type = ConverterUtil.get_arg(
              op, MaceKeyword.mace_padding_str
          )
          if padding_type is None:
              continue
          padding_arg = op.arg.add()
          padding_arg.name = MaceKeyword.mace_padding_values_str
          if padding_type.i == PaddingMode.VALID.value:
              padding_arg.ints.extend([0, 0, 0, 0])
          elif padding_type.i == PaddingMode.SAME.value:
              stride = ConverterUtil.get_arg(
                  op, MaceKeyword.mace_strides_str
              ).ints
              kernel = []
              dilation = [1, 1]
              if (
                  op.type == MaceOp.Conv2D.name
                  or op.type == MaceOp.DepthwiseConv2d.name
                  or op.type == MaceOp.Deconv2D.name
              ):
                  if (
                      ConverterUtil.get_arg(
                          op, MaceKeyword.mace_dilations_str
                      )
                      is not None
                  ):
                      dilation = ConverterUtil.get_arg(
                          op, MaceKeyword.mace_dilations_str
                      ).ints
                  for tensor in self._model.tensors:
                      if tensor.name == op.input[1]:
                          kernel = tensor.dims[1:3]
                          break
              else:
                  kernel = ConverterUtil.get_arg(
                      op, MaceKeyword.mace_kernel_str
                  ).ints
              in_size = []
              for input_info in self._model.input_info:
                  if input_info.name == op.input[0]:
                      in_size = input_info.dims[1:3]
                      break
              for _op in self._model.op:
                  for out in _op.output:
                      if out == op.input[0]:
                          in_size = _op.output_shape[0].dims[1:3]
                          break
                  if len(in_size) > 0:
                      break
              out_size = op.output_shape[0].dims[1:3]
              if op.type == MaceOp.Deconv2D.name:
                  h = (
                      (in_size[0] - 1) * stride[0]
                      + kernel[0]
                      - out_size[0]
                  )
                  w = (
                      (in_size[1] - 1) * stride[1]
                      + kernel[1]
                      - out_size[1]
                  )
              else:
                  h = (
                      (out_size[0] - 1) * stride[0]
                      + ((kernel[0] - 1) * dilation[0] + 1)
                      - in_size[0]
                  )
                  w = (
                      (out_size[1] - 1) * stride[1]
                      + ((kernel[1] - 1) * dilation[1] + 1)
                      - in_size[1]
                  )
              top = int(np.floor(h / 2))
              left = int(np.floor(w / 2))
              bottom = h - top
              right = w - left
              padding_arg.ints.extend([top, right, bottom, left])
  
imports: import copy
  import numpy
  from enum import Enum
  from operator import mul
  from py_proto import mace_pb2
  from transform import base_converter
  from transform.base_converter import ConverterUtil
  from transform.base_converter import EltwiseType
  from transform.base_converter import MaceKeyword
  from transform.base_converter import MaceOp
  from transform.base_converter import PaddingMode
  from transform.base_converter import PadType
  from transform.base_converter import PoolingType
  from transform.base_converter import ReduceType
  from transform.base_converter import DataFormat
  from transform.base_converter import FrameworkType
  from utils.util import mace_check
label_desc: Use image node_id 15 for calling the ApuConverter obj's underlying member method code with example usage: obj.add_tensorflow_padding_value() without return types