code: def _reduced_kernel_size_for_small_input(input_tensor, kernel_size):
      """Define kernel size which is automatically reduced for small input.
  
      If the shape of the input images is unknown at graph construction time this
      function assumes that the input images are large enough.
  
      Args:
        input_tensor: input tensor of size [batch_size, height, width, channels].
        kernel_size: desired kernel size of length 2: [kernel_height, kernel_width]
  
      Returns:
        a tensor with the kernel size.
      """
      shape = input_tensor.get_shape().as_list()
      if shape[1] is None or shape[2] is None:
          kernel_size_out = kernel_size
      else:
          kernel_size_out = [
              min(shape[1], kernel_size[0]),
              min(shape[2], kernel_size[1]),
          ]
      return kernel_size_out
  
file_path: MMdnn/mmdnn/conversion/examples/tensorflow/models/mobilenet_v1.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from collections import namedtuple
  import functools
  import tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: _reduced_kernel_size_for_small_input(input_tensor, kernel_size) and returns: kernel_size_out