diff options
Diffstat (limited to 'tensorflow/python/kernel_tests/reshape_op_test.py')
-rw-r--r-- | tensorflow/python/kernel_tests/reshape_op_test.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/python/kernel_tests/reshape_op_test.py b/tensorflow/python/kernel_tests/reshape_op_test.py index f3fc9086d6..12eb7fcc2f 100644 --- a/tensorflow/python/kernel_tests/reshape_op_test.py +++ b/tensorflow/python/kernel_tests/reshape_op_test.py @@ -106,6 +106,11 @@ class ReshapeTest(tf.test.TestCase): with self.assertRaisesRegexp(ValueError, "isn't divisible by 17"): tf.reshape(y, [17, -1]) + z = tf.constant(0.0, shape=[32, 128]) + with self.assertRaisesRegexp(ValueError, + "Cannot reshape a tensor with 4096 elements"): + tf.reshape(z, [4095]) + def testPartialShapes(self): x = tf.placeholder(tf.float32) |