diff options
author | A. Unique TensorFlower <nobody@tensorflow.org> | 2016-01-05 14:05:27 -0800 |
---|---|---|
committer | Vijay Vasudevan <vrv@google.com> | 2016-01-05 14:05:27 -0800 |
commit | 1c579361cd1e088dd5e05a394b1561a73e3667ba (patch) | |
tree | ec464b9ac18113dc052744b6714eebbc7c6cc34d /tensorflow/python/kernel_tests/shape_ops_test.py | |
parent | 208350a6092f9faa473daf8b6eb6a80e9f9518f1 (diff) |
Added 'logging' import to control_flow_ops which is used in the file but not imported.
Change: 110842260
Diffstat (limited to 'tensorflow/python/kernel_tests/shape_ops_test.py')
-rw-r--r-- | tensorflow/python/kernel_tests/shape_ops_test.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tensorflow/python/kernel_tests/shape_ops_test.py b/tensorflow/python/kernel_tests/shape_ops_test.py index 81be48990b..38ba890c74 100644 --- a/tensorflow/python/kernel_tests/shape_ops_test.py +++ b/tensorflow/python/kernel_tests/shape_ops_test.py @@ -227,15 +227,23 @@ class TileTest(tf.test.TestCase): def testSimple(self): with self.test_session(): - inp = np.random.rand(4, 1).astype("f") - a = tf.constant([float(x) for x in inp.ravel(order="C")], - shape=[4, 1], dtype=tf.float32) + inp = np.random.rand(4, 1).astype(np.float32) + a = tf.constant(inp) tiled = tf.tile(a, [1, 4]) result = tiled.eval() self.assertEqual(result.shape, (4, 4)) self.assertEqual([4, 4], tiled.get_shape()) self.assertTrue((result == np.tile(inp, (1, 4))).all()) + def testEmpty(self): + with self.test_session(): + inp = np.random.rand(2, 3).astype(np.float32) + a = tf.constant(inp) + tiled = tf.tile(a, [5, 0]) + result = tiled.eval() + self.assertEqual(result.shape, (10, 0)) + self.assertEqual([10, 0], tiled.get_shape()) + def testTypes(self): types_to_test = { "bool": (tf.bool, bool), |