好的。所以我对深度学习还很陌生。当我运行我的代码时,我得到了ValueError: Input 0 of layer sequential is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: (None, 1)
我的尺寸是
X = (6018,)
y = (6018,)
我的模型是
model = Sequential()
model.add(LSTM(64,input_shape=(1, 2),return_sequences=True))
model.add(LSTM(64,input_shape=(1, 2)))
model.add(Dense(32,activation='relu'))
model.add(Dense(1,activation='softmax'))
model.compile(optimizer='adam', loss = 'categorical_crossentropy',metrics = ['accuracy'])
model.fit(X,y,epochs=25,batch_size=5)
我已经引用了这个,但是当我尝试解决方案(当然调整数字)时,我仍然得到了错误。任何帮助,将不胜感激。