code: def get_kernel_params(cls, node, input_shape):
      kwargs = {}
  
      if node.kernel_parameters.global_pooling:
          kwargs["kernel_shape"] = [
              1,
              input_shape.height,
              input_shape.width,
              1,
          ]
          kwargs["pads"] = [0] * 8
  
      else:
          from mmdnn.conversion.caffe.graph import NodeKind
  
          if node.kind == NodeKind.Pooling:
              kwargs["kernel_shape"] = [
                  1,
                  node.kernel_parameters.k_h,
                  node.kernel_parameters.k_w,
                  1,
              ]
          elif node.kind in [
              NodeKind.Convolution,
              NodeKind.Deconvolution,
          ]:
              pass
          else:
              raise ValueError
  
          dilation = (
              node.parameters.dilation[0]
              if hasattr(node.parameters, "dilation")
              and node.parameters.dilation
              else 1
          )
          o_h_caffe = node.output_shape.height
          o_w_caffe = node.output_shape.width
          ko_h = dilation * (int(node.kernel_parameters.k_h) - 1) + 1
          ko_w = dilation * (int(node.kernel_parameters.k_w) - 1) + 1
  
          if node.kind == NodeKind.Deconvolution:
              o_h_tf = (
                  int(node.kernel_parameters.s_h)
                  * (input_shape.height - 1)
                  + ko_h
                  - 2 * int(node.kernel_parameters.p_h)
              )
              o_w_tf = (
                  int(node.kernel_parameters.s_w)
                  * (input_shape.width - 1)
                  + ko_w
                  - 2 * int(node.kernel_parameters.p_w)
              )
          else:
              o_h_tf = (
                  input_shape.height
                  + node.kernel_parameters.p_h * 2
                  - ko_h
                  + 1
              ) // node.kernel_parameters.s_h
              o_w_tf = (
                  input_shape.width
                  + node.kernel_parameters.p_w * 2
                  - ko_w
                  + 1
              ) // node.kernel_parameters.s_w
  
          kwargs["pads"] = [
              0,
              node.kernel_parameters.p_h,
              node.kernel_parameters.p_w,
              0,
          ] + [
              0,
              node.kernel_parameters.p_h + o_h_caffe - o_h_tf,
              node.kernel_parameters.p_w + o_w_caffe - o_w_tf,
              0,
          ]
  
      kwargs["strides"] = [
          1,
          node.kernel_parameters.s_h,
          node.kernel_parameters.s_w,
          1,
      ]
      cls._convert_output_shape(kwargs, node)
  
      return kwargs
  
imports: from __future__ import absolute_import
  from __future__ import division
  import numpy
  from mmdnn.conversion.caffe.errors import ConversionError
  from mmdnn.conversion.caffe.common_graph import Node
  from mmdnn.conversion.caffe.network import DEFAULT_PADDING
  from mmdnn.conversion.caffe.utils import get_lower_case
  from mmdnn.conversion.common.IR.graph_pb2 import TensorShape
label_desc: Use image node_id 2 for calling the NodeMapper obj's underlying member method code with example usage: obj.get_kernel_params(cls, node, input_shape) and returns: kwargs