关于输入数据的形状有一些错误,我尝试了一下,但我仍然得到了这些错误。错误: ValueError: Input 0 of layer sequential is incompatible with the layer: expected axis -1 of inputcategorical_crossentropy',optimizer = 'adam',metrics = ['accuracy'])
cnn.fit(X, Y, epochs =
当我开始训练网络时,我得到的错误就像标题中提到的那样。ValueError: Input 0 of layer "sequential" is incompatible with the layer: expected shape=(None, 99, 43, 1), found shape=(99, 43, 1) X_train[index] = np.load(path + fil
现在,我已经从视频中写下了确切的代码,但不幸的是,它并没有为我正确地计算出来。如果有人能帮我解决我的问题,我会很高兴的import numpy as npimport tensorflowx_train, y_train), (x_test, y_test) = mnist.load_data()
# normalise training data and cut down between 0x_tes
我遵循了CNN模型的做法,即使用盗梦空间V3对狗和猫进行分类。模型训练和保存是成功的,我想预测图片是狗还是猫。所以我这样做了,但我总是得到相同的错误。ValueError: Input 0 of layer sequential_3 is incompatible with the layer: # predict the class
result = model
我第一次使用tensorflow,并利用它将18个特征的数据分类为4类。 X_train的维度为:(14125,18)。metrics=['accuracy']) 在调用tfmodel.fit(dataset, epochs=15, validation_data=val_data)时,我收到以下错误: ValueError: Input 0 of layer dense_1 is incompatible with the layer: expected axis -1 of input shape