累加中的TensorFlow错误“ ScanOp:预期的扫描轴范围为[-1,1),但得到1”

时间:2019-03-08 23:14:34

标签: tensorflow

在模型训练期间,出现错误“ ScanOp:预期的扫描轴在[-1,1)范围内,但得到1”,这似乎来自cumsum()操作。我跟踪了代码,无法找出原因。有人可以帮忙吗?

下面是更详细的错误日志。

667.master   | [2019-03-08T22:42:28Z]   File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/math_ops.py", line 2373, in cumsum
667.master   | [2019-03-08T22:42:28Z]     x, axis, exclusive=exclusive, reverse=reverse, name=name)
667.master   | [2019-03-08T22:42:28Z]   File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_math_ops.py", line 2340, in cumsum
667.master   | [2019-03-08T22:42:28Z]     name=name)
667.master   | [2019-03-08T22:42:28Z]   File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
667.master   | [2019-03-08T22:42:28Z]     op_def=op_def)
667.master   | [2019-03-08T22:42:28Z]   File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 3414, in create_op
667.master   | [2019-03-08T22:42:28Z]     op_def=op_def)
667.master   | [2019-03-08T22:42:28Z]   File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1740, in __init__
667.master   | [2019-03-08T22:42:28Z]     self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access
667.master   | [2019-03-08T22:42:28Z] 
667.master   | [2019-03-08T22:42:28Z] InvalidArgumentError (see above for traceback): ScanOp: Expected scan axis in the range [-1, 1), but got 1

0 个答案:

没有答案