def regressed_keypoints_at_object_centers(regressed_keypoint_predictions, y_indices, x_indices):
    'Returns the regressed keypoints at specified object centers.\n\n  The original keypoint predictions are regressed relative to each feature map\n  location. The returned keypoints are expressed in absolute coordinates in the\n  output frame (i.e. the center offsets are added to each individual regressed\n  set of keypoints).\n\n  Args:\n    regressed_keypoint_predictions: A float tensor of shape\n      [batch_size, height, width, 2 * num_keypoints] holding regressed\n      keypoints. The last dimension has keypoint coordinates ordered as follows:\n      [y0, x0, y1, x1, ..., y{J-1}, x{J-1}] where J is the number of keypoints.\n    y_indices: A [batch, num_instances] int tensor holding y indices for object\n      centers. These indices correspond to locations in the output feature map.\n    x_indices: A [batch, num_instances] int tensor holding x indices for object\n      centers. These indices correspond to locations in the output feature map.\n\n  Returns:\n    A float tensor of shape [batch_size, num_objects, 2 * num_keypoints] where\n    regressed keypoints are gathered at the provided locations, and converted\n    to absolute coordinates in the output coordinate frame.\n  '
    (batch_size, _, width, _) = _get_shape(regressed_keypoint_predictions, 4)
    flattened_indices = flattened_indices_from_row_col_indices(y_indices, x_indices, width)
    (_, num_instances) = _get_shape(flattened_indices, 2)
    regressed_keypoints_flat = _flatten_spatial_dimensions(regressed_keypoint_predictions)
    relative_regressed_keypoints = tf.gather(regressed_keypoints_flat, flattened_indices, batch_dims=1)
    relative_regressed_keypoints = tf.reshape(relative_regressed_keypoints, [batch_size, num_instances, (- 1), 2])
    (relative_regressed_keypoints_y, relative_regressed_keypoints_x) = tf.unstack(relative_regressed_keypoints, axis=3)
    y_indices = _to_float32(tf.expand_dims(y_indices, axis=(- 1)))
    x_indices = _to_float32(tf.expand_dims(x_indices, axis=(- 1)))
    absolute_regressed_keypoints = tf.stack([(y_indices + relative_regressed_keypoints_y), (x_indices + relative_regressed_keypoints_x)], axis=3)
    return tf.reshape(absolute_regressed_keypoints, [batch_size, num_instances, (- 1)])
Returns the regressed keypoints at specified object centers.

The original keypoint predictions are regressed relative to each feature map
location. The returned keypoints are expressed in absolute coordinates in the
output frame (i.e. the center offsets are added to each individual regressed
set of keypoints).

Args:
  regressed_keypoint_predictions: A float tensor of shape
    [batch_size, height, width, 2 * num_keypoints] holding regressed
    keypoints. The last dimension has keypoint coordinates ordered as follows:
    [y0, x0, y1, x1, ..., y{J-1}, x{J-1}] where J is the number of keypoints.
  y_indices: A [batch, num_instances] int tensor holding y indices for object
    centers. These indices correspond to locations in the output feature map.
  x_indices: A [batch, num_instances] int tensor holding x indices for object
    centers. These indices correspond to locations in the output feature map.

Returns:
  A float tensor of shape [batch_size, num_objects, 2 * num_keypoints] where
  regressed keypoints are gathered at the provided locations, and converted
  to absolute coordinates in the output coordinate frame.
def regressed_keypoints_at_object_centers(regressed_keypoint_predictions, y_indices, x_indices):
    'Returns the regressed keypoints at specified object centers.\n\n  The original keypoint predictions are regressed relative to each feature map\n  location. The returned keypoints are expressed in absolute coordinates in the\n  output frame (i.e. the center offsets are added to each individual regressed\n  set of keypoints).\n\n  Args:\n    regressed_keypoint_predictions: A float tensor of shape\n      [batch_size, height, width, 2 * num_keypoints] holding regressed\n      keypoints. The last dimension has keypoint coordinates ordered as follows:\n      [y0, x0, y1, x1, ..., y{J-1}, x{J-1}] where J is the number of keypoints.\n    y_indices: A [batch, num_instances] int tensor holding y indices for object\n      centers. These indices correspond to locations in the output feature map.\n    x_indices: A [batch, num_instances] int tensor holding x indices for object\n      centers. These indices correspond to locations in the output feature map.\n\n  Returns:\n    A float tensor of shape [batch_size, num_objects, 2 * num_keypoints] where\n    regressed keypoints are gathered at the provided locations, and converted\n    to absolute coordinates in the output coordinate frame.\n  '
    (batch_size, _, width, _) = _get_shape(regressed_keypoint_predictions, 4)
    flattened_indices = flattened_indices_from_row_col_indices(y_indices, x_indices, width)
    (_, num_instances) = _get_shape(flattened_indices, 2)
    regressed_keypoints_flat = _flatten_spatial_dimensions(regressed_keypoint_predictions)
    relative_regressed_keypoints = tf.gather(regressed_keypoints_flat, flattened_indices, batch_dims=1)
    relative_regressed_keypoints = tf.reshape(relative_regressed_keypoints, [batch_size, num_instances, (- 1), 2])
    (relative_regressed_keypoints_y, relative_regressed_keypoints_x) = tf.unstack(relative_regressed_keypoints, axis=3)
    y_indices = _to_float32(tf.expand_dims(y_indices, axis=(- 1)))
    x_indices = _to_float32(tf.expand_dims(x_indices, axis=(- 1)))
    absolute_regressed_keypoints = tf.stack([(y_indices + relative_regressed_keypoints_y), (x_indices + relative_regressed_keypoints_x)], axis=3)
    return tf.reshape(absolute_regressed_keypoints, [batch_size, num_instances, (- 1)])