Skip to content

Commit e42ccd5

Browse files
committed
make private
1 parent f830058 commit e42ccd5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tensorflow_addons/losses/giou_loss.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,17 @@ def giou_loss(y_true, y_pred, mode='giou'):
8383
Returns:
8484
GIoU loss float `Tensor`.
8585
"""
86-
# if y_true or y_pred:
8786
if mode not in ['giou', 'iou']:
8887
raise ValueError("Value of mode should be 'iou' or 'giou'")
8988
y_pred = tf.convert_to_tensor(y_pred)
9089
y_true = tf.cast(y_true, y_pred.dtype)
91-
giou = do_giou_calculate(y_pred, y_true, mode)
90+
giou = _calculate_giou(y_pred, y_true, mode)
9291

9392
# compute the final loss and return
9493
return 1 - giou
9594

9695

97-
def do_giou_calculate(b1, b2, mode='giou'):
96+
def _calculate_giou(b1, b2, mode='giou'):
9897
"""
9998
Args:
10099
b1: bounding box. The coordinates of the each bounding box in boxes are

0 commit comments

Comments
 (0)