I am training a neural network which produces the following errors (epoch number on the x axis). I have some questions regrading interpreting it.

  • When I say model.predict is it giving me the result based on the final state (that is epoch 5000)?

  • Towards the end (and some places in the middle) there are places where the training error and validation error are farther apart. Does this mean that the model was over-fitting on those epochs?

  • Based on the graph, can one determine that the model was best at a certain epoch?

  • Does Keras have API methods to retrieve the model at a specific epoch so that I can retrieve the best model?

enter image description here

  • $\begingroup$ Somehow this looks like you are randomly initializing weights every epoch or your inputs are random $\endgroup$ – DuttaA Jun 9 '19 at 14:51
  • $\begingroup$ @DuttaA thank you for your comment. Can you please elaborate? Also looking at the train error,there is a wave like pattern. Would you not say that the wave like pattern indicates that the model is learning (that is it was performing best when the wave was at a minimum?) $\endgroup$ – Can't Tell Jun 9 '19 at 14:56
  • $\begingroup$ My bad I did not ask what do you mean by error? Is it loss or prediction error? $\endgroup$ – DuttaA Jun 9 '19 at 20:41
  • $\begingroup$ @DuttaA loss, as drawn in this example tensorflow.org/tutorials/keras/basic_regression, although the data is not the same. I just took the graph code from there $\endgroup$ – Can't Tell Jun 10 '19 at 9:21
  • $\begingroup$ do you do measures agains over-fitting or maybe reduce leraning rate with the time? $\endgroup$ – user8426627 Jun 11 '19 at 15:11

Your Answer

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

Browse other questions tagged or ask your own question.