'Tests whether channel means have been subtracted.'

def testSubtractChannelMean(self):

    with self.test_session():
        image = tf.zeros((240, 320, 3))
        means = [1, 2, 3]
        actual = preprocessor.subtract_channel_mean(image, means=means)
        actual = actual.eval()
        self.assertTrue((actual[:, :, 0] == (-1)).all())
        self.assertTrue((actual[:, :, 1] == (-2)).all())
        self.assertTrue((actual[:, :, 2] == (-3)).all())
