# transformers 5.24.1 (Apache-2.0), harvested by tools/harvest_corpus.py
=== input

    Decodes bounding box ground truth (GT) values into distribution-based GT representations.

    This function maps continuous GT values into discrete distribution bins, which can be used
    for regression tasks in object detection models. It calculates the indices of the closest
    bins to each GT value and assigns interpolation weights to these bins based on their proximity
    to the GT value.

    Args:
        gt (Tensor): Ground truth bounding box values, shape (N, ).
        max_num_bins (int): Maximum number of discrete bins for the distribution.
        reg_scale (float): Controls the curvature of the Weighting Function.
        up (Tensor): Controls the upper bounds of the Weighting Function.

    Returns:
        tuple[Tensor, Tensor, Tensor]:
            - indices (Tensor): Index of the left bin closest to each GT value, shape (N, ).
            - weight_right (Tensor): Weight assigned to the right bin, shape (N, ).
            - weight_left (Tensor): Weight assigned to the left bin, shape (N, ).
    
=== parse google
short_description: 'Decodes bounding box ground truth (GT) values into distribution-based GT representations.'
long_description: |
  This function maps continuous GT values into discrete distribution bins, which can be used
  for regression tasks in object detection models. It calculates the indices of the closest
  bins to each GT value and assigns interpolation weights to these bins based on their proximity
  to the GT value.
blank_after_short_description: True
blank_after_long_description: True
style: google
- DocstringParam
  description: 'Ground truth bounding box values, shape (N, ).'
  kind: param
  key: 'param'
  arg_name: 'gt'
  type_name: 'Tensor'
  is_optional: False
- DocstringParam
  description: 'Maximum number of discrete bins for the distribution.'
  kind: param
  key: 'param'
  arg_name: 'max_num_bins'
  type_name: 'int'
  is_optional: False
- DocstringParam
  description: 'Controls the curvature of the Weighting Function.'
  kind: param
  key: 'param'
  arg_name: 'reg_scale'
  type_name: 'float'
  is_optional: False
- DocstringParam
  description: 'Controls the upper bounds of the Weighting Function.'
  kind: param
  key: 'param'
  arg_name: 'up'
  type_name: 'Tensor'
  is_optional: False
- DocstringReturns
  description: |
    - indices (Tensor): Index of the left bin closest to each GT value, shape (N, ).
    - weight_right (Tensor): Weight assigned to the right bin, shape (N, ).
    - weight_left (Tensor): Weight assigned to the left bin, shape (N, ).
  kind: returns
  key: 'returns'
  type_name: 'tuple[Tensor, Tensor, Tensor]'
  is_generator: False
=== detect
google
=== compose google
Decodes bounding box ground truth (GT) values into distribution-based GT representations.

This function maps continuous GT values into discrete distribution bins, which can be used
for regression tasks in object detection models. It calculates the indices of the closest
bins to each GT value and assigns interpolation weights to these bins based on their proximity
to the GT value.

Args:
    gt (Tensor): Ground truth bounding box values, shape (N, ).
    max_num_bins (int): Maximum number of discrete bins for the distribution.
    reg_scale (float): Controls the curvature of the Weighting Function.
    up (Tensor): Controls the upper bounds of the Weighting Function.

Returns:
    tuple[Tensor, Tensor, Tensor]: - indices (Tensor): Index of the left bin closest to each GT value, shape (N, ).
        - weight_right (Tensor): Weight assigned to the right bin, shape (N, ).
        - weight_left (Tensor): Weight assigned to the left bin, shape (N, ).
