Skip to content

Unit 5, Exercise 2 #73

Answered by rasbt
csnatarajan asked this question in Exercises
Jul 13, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi there! This is actually a great observation. 100% agree with you that you'd expect 0%. The reason is a tiny implementation detail here. So, when you compute the classification accuracy on the training dataset during training, it is computing the accuracy on each batch. But then the model is updated after each batch.

What I mean is, it's like follows:

  • compute & track predictions on batch
  • update model via backprop
  • compute compute & track on batch
  • update model via backprop
  • ...
  • compute accuracy from these batch predictions

This is a workaround because otherwise it would be too expensive to compute the accuracy after each epoch if the training set is very large.

However, during validation…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@csnatarajan
Comment options

Answer selected by csnatarajan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants