def predicted_embeddings_at_object_centers(embedding_predictions, y_indices, x_indices):
    'Returns the predicted embeddings at specified object centers.\n\n  Args:\n    embedding_predictions: A float tensor of shape [batch_size, height, width,\n      reid_embed_size] holding predicted embeddings.\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, reid_embed_size] where\n    predicted embeddings are gathered at the provided locations.\n  '
    (batch_size, _, width, _) = _get_shape(embedding_predictions, 4)
    flattened_indices = flattened_indices_from_row_col_indices(y_indices, x_indices, width)
    (_, num_instances) = _get_shape(flattened_indices, 2)
    embeddings_flat = _flatten_spatial_dimensions(embedding_predictions)
    embeddings = tf.gather(embeddings_flat, flattened_indices, batch_dims=1)
    embeddings = tf.reshape(embeddings, [batch_size, num_instances, (- 1)])
    return embeddings
Returns the predicted embeddings at specified object centers.

Args:
  embedding_predictions: A float tensor of shape [batch_size, height, width,
    reid_embed_size] holding predicted embeddings.
  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, reid_embed_size] where
  predicted embeddings are gathered at the provided locations.
def predicted_embeddings_at_object_centers(embedding_predictions, y_indices, x_indices):
    'Returns the predicted embeddings at specified object centers.\n\n  Args:\n    embedding_predictions: A float tensor of shape [batch_size, height, width,\n      reid_embed_size] holding predicted embeddings.\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, reid_embed_size] where\n    predicted embeddings are gathered at the provided locations.\n  '
    (batch_size, _, width, _) = _get_shape(embedding_predictions, 4)
    flattened_indices = flattened_indices_from_row_col_indices(y_indices, x_indices, width)
    (_, num_instances) = _get_shape(flattened_indices, 2)
    embeddings_flat = _flatten_spatial_dimensions(embedding_predictions)
    embeddings = tf.gather(embeddings_flat, flattened_indices, batch_dims=1)
    embeddings = tf.reshape(embeddings, [batch_size, num_instances, (- 1)])
    return embeddings