ValueError:Cannot feed value of shape (277, 1) for Tensor ‘labels:0‘, which has shape ‘(?,)‘
在用Tensorflow 1.x的版本进行训练的时候,提示了这样的错误。labels = tf.placeholder(tf.int64, shape=[None,], name='labels')原因是喂入的label的shape和占位符的不匹配。其实还是因为我没有理解shape的含义,举个例子label1=[2,3,4,5]label2=[[2],[3],[4],[5]]print(np.array(label1).shape) #(4,)print(np.array(
原创
2022-03-31 15:00:46 ·
2034 阅读 ·
0 评论