Here is my code:
model = Sequential()
model.add(Dense(50, input_dim=33, init='uniform', activation='relu'))
for u in range(3):
model.add(Dense(33, init='uniform', activation='relu'))
model.add(Dense(122, init='uniform', activation='sigmoid'))
model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])
model.fit(X_train, Y_train, nb_epoch=35, batch_size=20, validation_split=0.2, callbacks=[EarlyStopping(monitor='val_loss', patience=10)])
It worked the Era and got better in accuracy, but then the loss became nano, and the accuracy went down. I used model.predictand got an error from this.
Has anyone received a fix?
source
share