Skip to content

Commit 3410cc2

Browse files
authored
fix batch positive mask
1 parent 7cc976d commit 3410cc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

train_ssd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def ssd_model_fn(features, labels, mode, params):
314314
positive_mask = flaten_cls_targets > 0
315315
n_positives = tf.count_nonzero(positive_mask)
316316

317-
batch_n_positives = tf.count_nonzero(cls_targets, -1)
317+
batch_n_positives = tf.count_nonzero(cls_targets > 0, -1)
318318

319319
batch_negtive_mask = tf.equal(cls_targets, 0)#tf.logical_and(tf.equal(cls_targets, 0), match_scores > 0.)
320320
batch_n_negtives = tf.count_nonzero(batch_negtive_mask, -1)

0 commit comments

Comments
 (0)