Up to now, I have saved models in this way:

checkpoint = ModelCheckpoint('Model-{epoch:05d}-{loss:.4f}-{acc:.4f}-{val_loss:.4f}-{val_acc:.4f}.h5', verbose=0, monitor='val_loss',save_best_only=True, mode='auto')

However, this creates a lot of files on the disk that I then have to delete, leaving only the best models. How do I get the loss, acc, val_loss and val_acc information from the best model (the last one saved using ModelCheckpoint) without storing them in the file name?

I tried to get the data from history.history, but all the values are stored there and I don't know which is the best. I can also easily get these parameters from the model from the last epoch. What I can't do is access the parameters of the best model.

0

There are 0 best solutions below