code: def kernel_parameters(self):
      assert self.kind in (
          NodeKind.Convolution,
          NodeKind.Pooling,
          NodeKind.Unpooling,
          NodeKind.Deconvolution,
      )
      params = self.parameters
      global_pooling = (
          hasattr(params, "global_pooling") and params.global_pooling
      )
      if not global_pooling:
          k_h = self.get_kernel_value(
              params.kernel_h, params.kernel_size, 0
          )
          k_w = self.get_kernel_value(
              params.kernel_w, params.kernel_size, 1
          )
          s_h = self.get_kernel_value(
              params.stride_h, params.stride, 0, default=1
          )
          s_w = self.get_kernel_value(
              params.stride_w, params.stride, 1, default=1
          )
      else:
          k_h = k_w = 0
          s_h = s_w = 1
      p_h = self.get_kernel_value(
          params.pad_h, params.pad, 0, default=0
      )
      p_w = self.get_kernel_value(
          params.pad_w, params.pad, 1, default=0
      )
      return KernelParameters(
          global_pooling, k_h, k_w, s_h, s_w, p_h, p_w
      )
  
imports: from collections import namedtuple
  from functools import reduce
  from google.protobuf import text_format
  from copy import deepcopy
  import numbers
  import os
  import tempfile
  from mmdnn.conversion.caffe.mapper import get_handler_name
  from mmdnn.conversion.caffe.resolver import get_caffe_resolver, has_pycaffe
  from mmdnn.conversion.caffe.shape import *
  from mmdnn.conversion.caffe.errors import print_stderr, ConversionError
label_desc: Use image node_id 6 for calling the CaffeNode obj's underlying member method code with example usage: obj.kernel_parameters() and returns: KernelParameters