original_docstring: 
      Return Smooth L1 Loss for bounding box prediction.
  
      Args:
          bbox_prediction: shape (1, H, W, num_anchors * 4)
          bbox_target:     shape (1, H, W, num_anchors * 4)
  
  
      Smooth L1 loss is defined as:
  
      0.5 * x^2                  if |x| < d
      abs(x) - 0.5               if |x| >= d
  
      Where d = 1 and x = prediction - target
  
      
docstring: Return Smooth L1 Loss for bounding box prediction.
docstring_tokens: Return Smooth L1 Loss for bounding box prediction .
code: def smooth_l1_loss(bbox_prediction, bbox_target, sigma=3.0):
      """
      Return Smooth L1 Loss for bounding box prediction.
  
      Args:
          bbox_prediction: shape (1, H, W, num_anchors * 4)
          bbox_target:     shape (1, H, W, num_anchors * 4)
  
  
      Smooth L1 loss is defined as:
  
      0.5 * x^2                  if |x| < d
      abs(x) - 0.5               if |x| >= d
  
      Where d = 1 and x = prediction - target
  
      """
      sigma2 = sigma ** 2
      diff = bbox_prediction - bbox_target
      abs_diff = tf.abs(diff)
      abs_diff_lt_sigma2 = tf.less(abs_diff, 1.0 / sigma2)
      bbox_loss = tf.reduce_sum(
          tf.where(
              abs_diff_lt_sigma2,
              0.5 * sigma2 * tf.square(abs_diff),
              abs_diff - 0.5 / sigma2
          ), [1]
      )
      return bbox_loss
code_tokens: def smooth_l1_loss ( bbox_prediction , bbox_target , sigma = 3.0 ) : sigma2 = sigma ** 2 diff = bbox_prediction - bbox_target abs_diff = tf . abs ( diff ) abs_diff_lt_sigma2 = tf . less ( abs_diff , 1.0 / sigma2 ) bbox_loss = tf . reduce_sum ( tf . where ( abs_diff_lt_sigma2 , 0.5 * sigma2 * tf . square ( abs_diff ) , abs_diff - 0.5 / sigma2 ) , [ 1 ] ) return bbox_loss
short_docstring: Return Smooth L1 Loss for bounding box prediction.
short_docstring_tokens: Return Smooth L1 Loss for bounding box prediction .
comment: """
      Return Smooth L1 Loss for bounding box prediction.
  
      Args:
          bbox_prediction: shape (1, H, W, num_anchors * 4)
          bbox_target:     shape (1, H, W, num_anchors * 4)
  
  
      Smooth L1 loss is defined as:
  
      0.5 * x^2                  if |x| < d
      abs(x) - 0.5               if |x| >= d
  
      Where d = 1 and x = prediction - target
  
      """