我是Python的初学者,我使用Keras和Tensorflow来创建ML模型。当我有4个类时,它工作得很好,但添加了更多的类,它得到了这个错误。Add增加了10个类。我花了3天的时间来解决这个问题,但我不能感谢import os as osfrom keras.utilsIMG_WIDTH = 28IM
我有128x128RGB图像形状的(n,128,128,3),带有(n,10,2)形状的标签。batch_size=5)print('\n\nAccuracy:', result[1]) 如果我运行它,我会得到错误ValueError: Error when checking target: expected dense_3 to have 2