plot_loss_history

plot_loss_history#

class pinnx.utils.plot_loss_history(loss_history, fname=None)[source]#

Plot the training and testing loss history.

Note

You need to call plt.show() to show the figure.

Parameters:
  • loss_historyLossHistory instance. The first variable returned from Trainer.train().

  • fname (string) – If fname is a string (e.g., ‘loss_history.png’), then save the figure to the file of the file name fname.