Tensorflow - setting an array element with a sequence.

File "C:\Users\GAOYAN\Anaconda2\envs\python35\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 416, in make_tensor_proto
    nparray = values.astype(dtype.as_numpy_dtype)
ValueError: setting an array element with a sequence.

这个错误是由于输入到tensor中的batch也好,或者随机值也好,在转成Tensor的时候需要列对其,也就是不能输入不定长的数组,因此对于不定长的数组需要进行填充操作

猜你喜欢

转载自blog.csdn.net/maka_uir/article/details/85060863