报错:
has invalid type <class 'numpy.ndarray'>, must be a string or Tensor. (Can not convert a ndarray into a Tensor or Operation.)
原因:
代码image,label= sess.run([img, label])中label变量的重复使用
修改变量名即可
image,labels= sess.run([img, label])
参考:https://stackoverflow.com/questions/44088706/cannot-convert-a-ndarray-into-a-tensor-or-operation-error-when-trying-to-fetc
网友评论