import tensorflow as tf

    self.assertAllClose(nms_scores1.numpy(), nms_scores_expected1.numpy())
    self.assertAllEqual(nms_classes1.numpy(), nms_classes_expected1.numpy())
    self.assertAllEqual(nms_masks2.numpy(), nms_masks_expected2.numpy())
    self.assertAllClose(nms_scores2.numpy(), nms_scores_expected2.numpy())
    self.assertAllEqual(nms_classes2.numpy(), nms_classes_expected2.numpy())

  def test_instance_non_maximum_suppression_1d_scores_empty_inputs(self):
    masks = tf.constant(1.0, shape=[0, 2, 2], dtype=tf.float32)
    scores = tf.constant([], dtype=tf.float32)
    classes = tf.constant([], dtype=tf.int32)
    (nms_masks1,
     nms_scores1,
     nms_classes1,
     _) = isu.instance_non_maximum_suppression_1d_scores(
         masks,
         scores,
         classes,
         min_score_thresh=0.65,
