def resize(image, size, resize_image_pl, resize_shape_pl, resize_op, session):
  """
  Performs resizing of image.
  :param image:           Image to resize.
  :param size:            Size of resized image.
  :param resize_image_pl: Resize operation input tensor.
  :param resize_shape_pl: Resize operation shape input tensor.
  :param resize_op:       Resize operation.
  :param session:         Tensorflow session.
  :return:                Resized image.

  """
  feed_dict = {
    resize_image_pl: image,
    resize_shape_pl: size,
  }

  return session.run(resize_op, feed_dict=feed_dict)