Keras: What does the train accuracy mean? What are the test samples?

Created on 23 Oct 2015  路  1Comment  路  Source: keras-team/keras

I don't know the train accuracy shown on console when operating cnn in keras. In terms of the train accuracy, are one batch samples taken as train samples? Which part is taken as test samples? Many thanks!

stale

Most helpful comment

You can see 2 accuracy values (and 2 loss values) while training..Train accuracy and train loss are calculated on the go, during training. These figures show how well your network is doing on the data it is being trained. Training accuracy usually keeps increasing throughout training.

After every epoch, your model is tested against a validation set, (or test samples), and validation loss and accuracy are calculated. These numbers tell you how good your model is at predicting outputs for inputs it has never seen before. Validation accuracy increases initially and drops as you over fit.

The train and test sets are explicitly given to the fit method as following:

model.fit(X_train, y_train, batch_size=batch_size, 
nb_epoch=nb_epoch, show_accuracy=True, 
validation_data=(X_test, y_test))

>All comments

You can see 2 accuracy values (and 2 loss values) while training..Train accuracy and train loss are calculated on the go, during training. These figures show how well your network is doing on the data it is being trained. Training accuracy usually keeps increasing throughout training.

After every epoch, your model is tested against a validation set, (or test samples), and validation loss and accuracy are calculated. These numbers tell you how good your model is at predicting outputs for inputs it has never seen before. Validation accuracy increases initially and drops as you over fit.

The train and test sets are explicitly given to the fit method as following:

model.fit(X_train, y_train, batch_size=batch_size, 
nb_epoch=nb_epoch, show_accuracy=True, 
validation_data=(X_test, y_test))
Was this page helpful?
0 / 5 - 0 ratings

Related issues

amityaffliction picture amityaffliction  路  3Comments

MarkVdBergh picture MarkVdBergh  路  3Comments

vinayakumarr picture vinayakumarr  路  3Comments

zygmuntz picture zygmuntz  路  3Comments

farizrahman4u picture farizrahman4u  路  3Comments