def image_with_dynamic_shape(height, width, channels):
  """Returns a single image with dynamic shape."""
  h = tf.random.uniform([], minval=height, maxval=height+1, dtype=tf.int32)
  w = tf.random.uniform([], minval=width, maxval=width+1, dtype=tf.int32)
  image = tf.random.uniform([h, w, channels])
  return image
Returns a single image with dynamic shape.
inference_api/src/main/object_detection/utils/test_utils.py