Commit 5cee7220 authored by Zhenyu Tan's avatar Zhenyu Tan Committed by A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 332377554
parent e342145e
...@@ -146,16 +146,12 @@ class BoxMatcher: ...@@ -146,16 +146,12 @@ class BoxMatcher:
else: else:
return matches return matches
if similarity_matrix.shape.is_fully_defined(): num_gt_boxes = similarity_matrix.shape.as_list()[0] or tf.shape(
if similarity_matrix.shape.dims[0].value == 0: similarity_matrix)[0]
return _match_when_rows_are_empty() return tf.cond(
else: pred=tf.greater(num_gt_boxes, 0),
return _match_when_rows_are_non_empty() true_fn=_match_when_rows_are_non_empty,
else: false_fn=_match_when_rows_are_empty)
return tf.cond(
pred=tf.greater(tf.shape(similarity_matrix)[0], 0),
true_fn=_match_when_rows_are_non_empty,
false_fn=_match_when_rows_are_empty)
def _set_values_using_indicator(self, x, indicator, val): def _set_values_using_indicator(self, x, indicator, val):
"""Set the indicated fields of x to val. """Set the indicated fields of x to val.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment