"vscode:/vscode.git/clone" did not exist on "fefbdd1264973bd7b7ed811b494753288b2e595d"
Commit 3d166f95 authored by Neal Wu's avatar Neal Wu
Browse files

Swap tf.constant with tf.random_uniform for consistency

parent c20eb5ff
......@@ -113,8 +113,7 @@ class BaseTest(tf.test.TestCase):
model = cifar10_main.Cifar10Model(
32, data_format='channels_last', num_classes=num_classes)
fake_input = tf.constant(
0.0, shape=[batch_size, _HEIGHT, _WIDTH, _NUM_CHANNELS])
fake_input = tf.random_uniform([batch_size, _HEIGHT, _WIDTH, _NUM_CHANNELS])
output = model(fake_input, training=True)
self.assertAllEqual(output.shape, (batch_size, num_classes))
......
......@@ -182,8 +182,7 @@ class BaseTest(tf.test.TestCase):
model = imagenet_main.ImagenetModel(
50, data_format='channels_last', num_classes=num_classes)
fake_input = tf.constant(
0.0, shape=[batch_size, 224, 224, 3])
fake_input = tf.random_uniform([batch_size, 224, 224, 3])
output = model(fake_input, training=True)
self.assertAllEqual(output.shape, (batch_size, num_classes))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment