如何跟踪“无效的参数:维度1的切片索引0越界。”

时间:2019-12-12 10:42:02

标签: python tensorflow tensor2tensor

我已经实现了一种在培训期间用于示例预处理的方法。

我能够将其归结为一个特定的功能。如果我在训练期间使用它,我会在日志中看到它:

INFO:tensorflow:Running local_init_op.
INFO:tensorflow:Done running local_init_op.
INFO:tensorflow:Saving checkpoints for 0 into /mariana/models/.model=ed6f9dfedc5dbba0_shards=9e8a89eceebc4a45/checkpoints/model.ckpt.
2019-12-12 11:36:07.608652: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at strided_slice_op.cc:106 : Invalid argument: slice index 0 of dimension 1 out of bounds.
2019-12-12 11:36:07.608709: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at strided_slice_op.cc:106 : Invalid argument: slice index 0 of dimension 1 out of bounds.
...
2019-12-12 11:36:08.105489: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at strided_slice_op.cc:106 : Invalid argument: slice index 0 of dimension 1 out of bounds.
2019-12-12 11:36:08.105494: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at strided_slice_op.cc:106 : Invalid argument: slice index 0 of dimension 1 out of bounds.
2019-12-12 11:36:08.105494: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at strided_slice_op.cc:106 : Invalid argument: slice index 0 of dimension 1 out of bounds.
2019-12-12 11:36:08.105494: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at strided_slice_op.cc:106 : Invalid argument: slice index 0 of dimension 1 out of bounds.
2019-12-12 11:36:08.105728: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at strided_slice_op.cc:106 : Invalid argument: slice index 0 of dimension 1 out of bounds.
2019-12-12 11:36:08.105754: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at strided_slice_op.cc:106 : Invalid argument: slice index 0 of dimension 1 out of bounds.

我无法在单元测试中重现此问题,也无法在另一个项目中重现此问题,在该项目中我使用相同的功能而不会出错。

由于没有得到堆栈跟踪,所以我不知道问题是什么或在哪里寻找错误。

是否有办法从tensorflow中获取更多有关此类错误的信息?

0 个答案:

没有答案