def testSubtractChannelMean(self):
    """Tests whether channel means have been subtracted."""
    def graph_fn():
      image = tf.zeros((240, 320, 3))
      means = [1, 2, 3]
      actual = preprocessor.subtract_channel_mean(image, means=means)
      return actual
    actual = self.execute_cpu(graph_fn, [])
    self.assertTrue((actual[:, :, 0], -1))
    self.assertTrue((actual[:, :, 1], -2))
    self.assertTrue((actual[:, :, 2], -3))
Tests whether channel means have been subtracted.
inference_api/src/main/object_detection/core/preprocessor_test.py