From b7ecb3666c6aadc22a62e10639a01c95ed72d980 Mon Sep 17 00:00:00 2001 From: Mihai Maruseac Date: Thu, 27 Jan 2022 10:47:30 -0800 Subject: [PATCH] Bump the maximum threshold before erroring PiperOrigin-RevId: 424653571 Change-Id: Ic2d9f3a7db627d78cde80ad415105f3d53735b3b --- tensorflow/core/framework/shape_inference.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/core/framework/shape_inference.cc b/tensorflow/core/framework/shape_inference.cc index 2742d830bf1ae7..73a985810ce27b 100644 --- a/tensorflow/core/framework/shape_inference.cc +++ b/tensorflow/core/framework/shape_inference.cc @@ -796,7 +796,7 @@ Status InferenceContext::InternalMakeShapeFromTensor( // `tf.range`/`tf.ones`, etc. where the shape is not really materialized, // only used during the inference. Hence, just prevent doing a `reserve` // with a very large argument. - const int64_t max_dimensions = 1 << 20; + const int64_t max_dimensions = 1 << 25; if (num_dims >= max_dimensions) { return errors::Internal( "Cannot create a tensor with ", num_dims,