print(X.shape,Y.shape)
#(5877, 257, 1) (5877, 257, 1)
model = Sequential()
model.add(LSTM(257, input_shape=(257,1),stateful=False,return_sequences=True))
model.add(Dense(257, activation='sigmoid'))
model.compile(loss=losses.mean_squared_error, optimizer='adam', metrics=['accuracy'])
model.fit(x=X,y=Y,epochs=100,shuffle=False)
检查目标时出错:期望dense_1具有形状(257,257)但是具有形状的数组(257,1)
我应该将5877 frames of size 257
提供给lstm图层。输出具有相同的格式。哪里弄错了?