转自: https://blog.csdn.net/jacke121/article/details/78833922

has invalid type <class 'numpy.ndarray'>, must be a string or Tensor. (Can not convert a ndarray into a Tensor or Operation.)

 

原因:变量命名重复了

image_test, label_test = get_batch(x_val, y_val, w, h, batch_size, CAPACITY)
img_test, label_test = sess.run([image_test, label_test])

解决方法:把任意一个变量名改了就好了

相关文章:

  • 2021-07-15
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-22
  • 2021-04-12
  • 2021-05-12
  • 2022-12-23
  • 2021-09-29
  • 2021-06-14
  • 2022-12-23
相关资源
相似解决方案