在以下代码中,我收到有关形状的错误。调用fit()函数时无法理解和寻求帮助
import keras
from keras.models import Model, load_model,Sequential
from keras.layers import Activation, Dropout, Flatten, Dense
hidden_layer_len = 300
# X and Y are input and output respectively with shape (3404, 1705)
model = Sequential()
inputLayer = Dense(units= X.shape[0])
hiddenLayer = Dense(units=hidden_layer_len,activation='linear')
outputLayer = Dense(units=Y.shape[0],activation='softmax')
model.add(inputLayer)
model.add(hiddenLayer)
model.add(outputLayer)
model.compile(optimizer='sgd',loss='mean_squared_error')
model.fit(X,Y,epochs=50)
我无法理解为什么会出现此错误。