code: def get_output_shape(
      auto_pad,
      input_spatial_shape,
      kernel_spatial_shape,
      strides_spatial,
  ):
      """
      return output shape of conv2d or pooling,
      ! borrow from onnx
      Args:
          auto_pad: string
          input_spatial_shape: list[int]
          kernel_spatial_shape: list[int]
          strides_spatial: list[int]
          output_spatial_shape: list[int]
      Returns:
          list[int
      """
      out_shape = [0] * len(input_spatial_shape)
      if auto_pad in ("SAME_UPPER", "SAME_LOWER"):
          for i in range(len(input_spatial_shape)):
              out_shape[i] = int(
                  np.ceil(
                      float(input_spatial_shape[i])
                      / float(strides_spatial[i])
                  )
              )
      elif auto_pad == "VALID":
          for i in range(len(input_spatial_shape)):
              out_shape[i] = int(
                  np.ceil(
                      float(
                          input_spatial_shape[i]
                          - (kernel_spatial_shape[i] - 1)
                      )
                      / float(strides_spatial[i])
                  )
              )
      return out_shape
  
file_path: singa/python/singa/utils.py
imports: import sys
  import numpy
  import collections
  from .None import singa_wrap
label_desc: Use image node_id 7 for calling a global function with example usage: get_output_shape(auto_pad, input_spatial_shape, kernel_spatial_shape, strides_spatial) and returns: out_shape