Commit 3fff4b86 authored by Zhichao Lu's avatar Zhichao Lu Committed by lzc5123016
Browse files

Replace the kernel error message with op error message....

Replace the kernel error message with op error message. https://github.com/tensorflow/tensorflow/pull/16890 added a new check in the op.

PiperOrigin-RevId: 187665000
parent 2207d2e0
...@@ -738,12 +738,9 @@ class NonMaxSuppressionTest(tf.test.TestCase): ...@@ -738,12 +738,9 @@ class NonMaxSuppressionTest(tf.test.TestCase):
boxes.add_field('scores', tf.constant([.9, .75, .6, .95, .5])) boxes.add_field('scores', tf.constant([.9, .75, .6, .95, .5]))
iou_thresh = .5 iou_thresh = .5
max_output_size = 3 max_output_size = 3
nms = box_list_ops.non_max_suppression( with self.assertRaisesWithPredicateMatch(ValueError,
boxes, iou_thresh, max_output_size) 'Dimensions must be equal'):
with self.test_session() as sess: box_list_ops.non_max_suppression(boxes, iou_thresh, max_output_size)
with self.assertRaisesWithPredicateMatch(
errors.InvalidArgumentError, 'scores has incompatible shape'):
sess.run(nms.get())
def test_select_from_three_clusters(self): def test_select_from_three_clusters(self):
corners = tf.constant([[0, 0, 1, 1], corners = tf.constant([[0, 0, 1, 1],
......
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