1
训练我MNIST分类网后,我想对测试数据“预测”,并得到了有关测试输入的形状TensorFlow:形状误差
testimages = np.array(test)
print(testimages.shape)
> (28000, 784)
feed_dict = {x: [testimages]}
classification = sess.run(y, feed_dict)
ValueError异常以下错误:无法养活形状的值(1 (尺寸(无),尺寸(784))
因此,形状是(28000,784)(它应该是(28000,784) be),但是当进入训练有素的网络时,它显示为(1,28,000,784)?
顺便说一句,训练我通过
trainlabels = np.array(train["label"])
trainimages = np.array(train.iloc[:, 1:])
包括训练数据,因为训练数据产生了第一列说明的标签。我使用熊猫进口。