I am studying for CNN with Google Colab. I tried to print the validation accuracy by training the model. But the problem is that there is only warning sign without 'val_acc'.
Anyone having a woking solution?
This is the code I've used:
from keras.callbacks import ModelCheckpoint, ReduceLROnPlateau
checkp = ModelCheckpoint('./result_model.h5', monitor = 'val_acc', verbose = 1, save_best_only = True)
reduce = ReduceLROnPlateau(monitor = 'val_acc', patience = 20, verbose = 1)
history = model.fit(
train_dataset,
validation_data=validation_dataset,
epochs=100,
callbacks=[checkp],
)
This is the error:
Epoch 1/100
29/30 [============================>.] - ETA: 0s - loss: 22.8816WARNING:tensorflow:Can save best model only with val_acc available, skipping.
30/30 [==============================] - 9s 121ms/step - loss: 22.8274 - val_loss: 16.4967
Epoch 2/100
29/30 [============================>.] - ETA: 0s - loss: 16.3546WARNING:tensorflow:Can save best model only with val_acc available, skipping.
30/30 [==============================] - 2s 74ms/step - loss: 16.3551 - val_loss: 16.2373
.....