1銆両n training process, validation data are necessary? According to my experiments, training loss is also decreasing and training accuracy is also visible without validation data (I use model.fit()). So I think validation data are not necessary. The positions of validation_X,validation_Y could be assigned to test data. Am I wrong?
hist = model.fit(train,train_label, batch_size=32, nb_epoch=10, verbose=1, show_accuracy=True, validation_data=(test, test_label))
print (max(hist.history['val_acc']))
2銆両n fit()
function, how can I get the best model among the total epoches?
Any opinions would be appreciated!
save_best_only=True
@rpinsler Thanks for your reply! I have read the checkpoint function. I find that monitor must be 'val_loss' or 'val_acc'. Therefore, it is necessary to set validation data to get the best model. If I don't want to leverage the validation data, which will make the training samples less, how can I get the best model?
You have to use a validation set. More or less by definition, the best model is the one which generalizes best, i.e. performs best on unseen data.
Most helpful comment
You have to use a validation set. More or less by definition, the best model is the one which generalizes best, i.e. performs best on unseen data.