Skip to content

InvalidArgument error with tf.scan() #12403

@danakianfar

Description

@danakianfar

System information

  • No custom code
  • Error encountered on Windows 10 and CentOS 6.7
  • binary
  • TF 1.1.0 and 1.2.1 respectively
  • 3.6
  • CUDA 8.0, CUDNN 5.1
  • GeForce 940MX 2GB (ran out of memory in execution), Titan X 12 GB

Describe the problem

I encountered this error when using tf.scan on an MultiRNNCell.

InvalidArgumentError (see above for traceback): Max scatter index must be <= array size (141 vs. 141)

Source code / logs

If you look here: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/tensor_array_ops.cc#L1072

OP_REQUIRES(
          ctx, max_index < array_size,
          errors::InvalidArgument("Max scatter index must be <= array size (",
                                  max_index, " vs. ", array_size, ")"));
    }

It seems that the condition (<) is not consistent with the error message (<=).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions