Skip to content
Advertisement

How can I print the training and validation graphs, and training and validation loss graphs?

I need to plot the training and validation graphs, and trarining and validation loss for my model.

JavaScript

Advertisement

Answer

history object contains both accuracy and loss for both the training as well as the validation set. We can use matplotlib to plot from that.

In these plots x-axis is no_of_epochs and the y-axis is accuracy and loss value. Below is one basic implementation to achieve that, it can easily be customized according to requirements.

JavaScript

Plot would look like below:

Accuracy and Loss plot

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement