aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/kernel_tests/constant_op_test.py
diff options
context:
space:
mode:
authorGravatar Jianmin Chen <jmchen@google.com>2016-10-14 15:54:21 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-10-14 17:05:45 -0700
commit5d1c0c41510f51a707373f0d1efabf3be44fa480 (patch)
tree17ceb20bcf6f5a49024c8270bc3a94d2bf00749f /tensorflow/python/kernel_tests/constant_op_test.py
parent8ce0576beb536446473abf8d6562c60c7ff838d7 (diff)
Register Fill with quint8.
Change: 136214096
Diffstat (limited to 'tensorflow/python/kernel_tests/constant_op_test.py')
-rw-r--r--tensorflow/python/kernel_tests/constant_op_test.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tensorflow/python/kernel_tests/constant_op_test.py b/tensorflow/python/kernel_tests/constant_op_test.py
index 71ffe8c61d..430f9e810a 100644
--- a/tensorflow/python/kernel_tests/constant_op_test.py
+++ b/tensorflow/python/kernel_tests/constant_op_test.py
@@ -491,6 +491,15 @@ class FillTest(tf.test.TestCase):
np_ans = np.array([[0.15] * 3] * 2).astype(np.complex128)
self._compare([2, 3], np_ans[0][0], np_ans, use_gpu=False)
+ def testFillQUint8(self):
+ np_ans = np.array([[42] * 3] * 2).astype(np.uint8)
+ with self.test_session(use_gpu=False):
+ val = tf.placeholder(dtype=tf.quint8, shape=())
+ tf_ans = tf.fill([2,3], val, name="fill")
+ out = tf_ans.eval(
+ feed_dict={val: np.array([42]).reshape([]).astype(np.uint8)})
+ self.assertAllClose(np_ans, out)
+
def testFillString(self):
np_ans = np.array([[b"yolo"] * 3] * 2)
with self.test_session(use_gpu=False):