Keras - why are acc and val_acc missing from the progress stats?

Hi All,
Does anyone else encounter the issue of missing acc and val_acc from the progress stats when they are fitting a model? Here is what it looks like for me:

model.fit_generator(train_batches, train_batches.nb_sample,
nb_epoch=nb_epoch,
validation_data=val_batches, nb_val_samples=val_batches.nb_sample
)

And I get this:

Found 20015 images belonging to 10 classes.
Found 2409 images belonging to 10 classes.
Epoch 1/3
20015/20015 [==============================] - 1425s - loss: 0.7659 - val_loss: 0.9314
Epoch 2/3
20015/20015 [==============================] - 1403s - loss: 0.4797 - val_loss: 1.1418
Epoch 3/3
20015/20015 [==============================] - 1501s - loss: 0.4419 - val_loss: 0.8882

What am I doing wrong that it is not displaying acc or val_acc?

Thanks, Christina

When compiling the model you need to add metrics=[‘accuracy’] as one of the parameters:

model.compile(optimizer, loss, metrics=<a list of metrics you would like to use>)
3 Likes

@radek Thanks so much – that worked! :slight_smile: