Skip to content

Commit

Permalink
Bump the maximum threshold before erroring
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 424653571
Change-Id: Ic2d9f3a7db627d78cde80ad415105f3d53735b3b
  • Loading branch information
mihaimaruseac committed Jan 27, 2022
1 parent e542736 commit b7ecb36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensorflow/core/framework/shape_inference.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b7ecb36

Please sign in to comment.