我正在使用tensorflow 1.0 CPU在Ubuntu和Python 3.5上。我将tensorflow的一个示例应用于自己的数据集 https://github.com/martin-gorner/tensorflow-mnist-tutorial。只要输出数量少于10个,它就可以正常运行。当输出数量超过10个时,我会收到以下错误提示:
InvalidArgumentError (see above for traceback): indices[1] = 10 is not in [0, 10)
[[Node: Gather_4 = Gather[Tindices=DT_INT64,
Tparams=DT_FLOAT,
validate_indices=true,
_device="/job:localhost/replica:0/task:0/cpu:0"](grayscale_to_rgb, ArgMax_4)]]
需要帮助吗?
[0, 10)
表示有效区间是左开右闭的,换句话说,有效值不包括10
。 - Łukasz Rogalski