import tensorflow as tf

    nms_classes_expected1 = tf.constant([1, 2, 2], dtype=tf.int32)
    (nms_masks2,
     nms_scores2,
     nms_classes2) = isu.instance_non_maximum_suppression_2d_scores(
         masks,
         scores,
         3,
         min_score_thresh=0.65,
         min_iou_thresh=0.5,
         is_class_agnostic=False)
    nms_masks_expected2 = tf.stack([mask2, mask0, mask5, mask4])
    nms_scores_expected2 = tf.constant([0.95, 1.0, 0.8, 0.7], dtype=tf.float32)
    nms_classes_expected2 = tf.constant([0, 1, 2, 2], dtype=tf.int32)
    self.assertAllEqual(nms_masks1.numpy(), nms_masks_expected1.numpy())
    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())

