def testResizePadToMultipleWithMasks(self):
    """Tests resizing when padding to multiple with masks."""
    def graph_fn():
      image = tf.ones((200, 100, 3), dtype=tf.float32)
      masks = tf.ones((10, 200, 100), dtype=tf.float32)

      _, out_masks, out_shape = preprocessor.resize_pad_to_multiple(
          image, multiple=32, masks=masks)
      return [out_masks, out_shape]

    out_masks, out_shape = self.execute_cpu(graph_fn, [])
    self.assertAllClose(out_masks.sum(), 200 * 100 * 10)
    self.assertAllEqual(out_shape, (200, 100, 3))
    self.assertAllEqual(out_masks.shape, (10, 224, 128))
Tests resizing when padding to multiple with masks.
inference_api/src/main/object_detection/core/preprocessor_test.py