提交 4590f822 编写于 作者: A A. Unique TensorFlower 提交者: TensorFlower Gardener

Change callers of tf.image.per_image_whitening() to use...

Change callers of tf.image.per_image_whitening() to use tf.image.per_image_standardization(). Once these changes are submitted, per_image_whitening() can be removed.
Change: 137714408
上级 f40555dc
......@@ -179,7 +179,7 @@ def distorted_inputs(data_dir, batch_size):
lower=0.2, upper=1.8)
# Subtract off the mean and divide by the variance of the pixels.
float_image = tf.image.per_image_whitening(distorted_image)
float_image = tf.image.per_image_standardization(distorted_image)
# Ensure that the random shuffling has good mixing properties.
min_fraction_of_examples_in_queue = 0.4
......@@ -234,7 +234,7 @@ def inputs(eval_data, data_dir, batch_size):
width, height)
# Subtract off the mean and divide by the variance of the pixels.
float_image = tf.image.per_image_whitening(resized_image)
float_image = tf.image.per_image_standardization(resized_image)
# Ensure that the random shuffling has good mixing properties.
min_fraction_of_examples_in_queue = 0.4
......
......@@ -581,14 +581,14 @@ class PerImageWhiteningTest(test_util.TensorFlowTestCase):
with self.test_session(use_gpu=True):
x = constant_op.constant(x_np, shape=x_shape)
y = image_ops.per_image_whitening(x)
y = image_ops.per_image_standardization(x)
y_tf = y.eval()
self.assertAllClose(y_tf, y_np, atol=1e-4)
def testUniformImage(self):
im_np = np.ones([19, 19, 3]).astype(np.float32) * 249
im = constant_op.constant(im_np)
whiten = image_ops.per_image_whitening(im)
whiten = image_ops.per_image_standardization(im)
with self.test_session(use_gpu=True):
whiten_np = whiten.eval()
self.assertFalse(np.any(np.isnan(whiten_np)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册