code: def _aspect_preserving_resize(image, resize_min):
    
    mlperf_log.resnet_print(key=mlperf_log.INPUT_RESIZE_ASPECT_PRESERVING,
                            value={"min": resize_min})
  
    shape = tf.shape(image)
    height, width = shape[0], shape[1]
  
    new_height, new_width = _smallest_size_at_least(height, width, resize_min)
  
    return _resize_image(image, new_height, new_width)
docs: Resize images preserving the original aspect ratio.
  
    Args:
      image: A 3-D image `Tensor`.
      resize_min: A python integer or scalar `Tensor` indicating the size of
        the smallest side after resize.
  
    Returns:
      resized_image: A 3-D tensor containing the resized image.