跑DNN的时候,遇到了下面的问题:
model = Sequential()
model.add(Dense(1024, input_shape=(X_train.shape[1],)))#choosing the number of neurons as 2/3* input shape
model.add(Activation('relu'))
model.add(Dropout(0.5))# drop out layers to avoid overfitting
model.add(Dense(1024))
model.add(Activation('relu'))
model.add(Dropout(0.5))
model.add(Dense(1024))
model.add(Activation('relu'))
model.add(Dropout(0.5))
model.add(Dense(num_labels))#number of neurons equivalent to output
model.add(Activation('softmax'))#multi class text classification
IndexError: tuple index out of range
请教如何解决这个问题,谢谢!