From 80ddbda905161585e3aa386a251db9bef94839ea Mon Sep 17 00:00:00 2001 From: Raffi Khatchadourian Date: Thu, 1 Aug 2024 13:19:58 -0400 Subject: [PATCH] Avert `InvalidArgumentError` during training. Fixes https://github.com/Viredery/tf-eager-fasterrcnn/issues/20? --- detection/core/bbox/bbox_target.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detection/core/bbox/bbox_target.py b/detection/core/bbox/bbox_target.py index 00b9c5d..3a49664 100644 --- a/detection/core/bbox/bbox_target.py +++ b/detection/core/bbox/bbox_target.py @@ -154,7 +154,7 @@ def _build_single_target(self, proposals, gt_boxes, gt_class_ids, img_shape, bat rois = tf.pad(rois, [(0, P), (0, 0)]) # [num_rois, 5] labels = tf.pad(labels, [(0, N)], constant_values=0) - labels = tf.pad(labels, [(0, P)], constant_values=-1) # [num_rois] + labels = tf.pad(labels, [(0, P)], constant_values=0) # [num_rois] delta_targets = tf.pad(delta_targets, [(0, N + P), (0, 0)]) # [num_rois, 4]