You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
其中model.add(Flatten())有错:
Exception: The shape of the input to "Flatten" is not fully defined (got (None, 100). Make sure to pass a complete "input_shape" or "batch_input_shape" argument to the first layer in your model.
The text was updated successfully, but these errors were encountered:
在模型结构中出现问题:
model = Sequential()
model.add(Embedding(maxfeatures, 100,weights=init_weight))
model.add(Flatten())
model.add(Dense(700, 100))
model.add(Dropout(0.5))
model.add(Activation('relu'))
model.add(Dense(100, nb_classes))
model.add(Activation('softmax'))
model.compile(loss='categorical_crossentropy', optimizer='adam')
其中model.add(Flatten())有错:
Exception: The shape of the input to "Flatten" is not fully defined (got (None, 100). Make sure to pass a complete "input_shape" or "batch_input_shape" argument to the first layer in your model.
The text was updated successfully, but these errors were encountered: