0
$\begingroup$

I know the metric sparse_categorical_accuracy

Fit model on training data
Epoch 1/2
782/782 [==============================] - 1s 1ms/step - loss: 0.3485 - sparse_categorical_accuracy: 0.9011 - val_loss: 0.1956 - val_sparse_categorical_accuracy: 0.9438
Epoch 2/2
782/782 [==============================] - 1s 1ms/step - loss: 0.1653 - sparse_categorical_accuracy: 0.9514 - val_loss: 0.1340 - val_sparse_categorical_accuracy: 0.9616

But

  • What is the different between sparse_categorical_accuracy and val_sparse_categorical_accuracy
  • What does it mean if during the training sparse_categorical_accuracy is increasing but val_sparse_categorical_accuracy seems to be stucked
$\endgroup$
1
$\begingroup$

The difference is simply that the first one is the value calculated on your training dataset, whereas the metric prefixed with 'val' is the value calculated on your test dataset. If the metric on your test dataset is staying the same or decreasing while it is increasing on your training dataset you are overfitting your model on your training dataset, meaning that the model is trying to fit on noise present in the training dataset causing your model to perform worse on out-of-sample data.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.