We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
resource_variable_ops.cc
1 parent d5f28c9 commit bc9c546Copy full SHA for bc9c546
tensorflow/core/kernels/resource_variable_ops.cc
@@ -660,6 +660,11 @@ class ResourceGatherOp : public OpKernel {
660
OP_REQUIRES(
661
c, TensorShapeUtils::IsVectorOrHigher(params.shape()),
662
errors::InvalidArgument("params must be at least 1 dimensional"));
663
+ OP_REQUIRES(
664
+ c, params.shape().dims() >= batch_dims_,
665
+ errors::InvalidArgument("params must have at least ", batch_dims_,
666
+ " (batch_dims) dimensions but it has shape ",
667
+ params.shape().DebugString()));
668
669
// Check that we have enough index space
670
const int64_t N = indices.NumElements();
0 commit comments