saveplot#
- class pinnx.utils.saveplot(loss_history, train_state, issave=True, isplot=True, loss_fname='loss.dat', train_fname='train.dat', test_fname='test.dat', output_dir=None)[source]#
Save/plot the loss history and best trained result.
This function is used to quickly check your results. To better investigate your result, use
save_loss_history()andsave_best_state().- Parameters:
loss_history –
LossHistoryinstance. The first variable returned fromTrainer.train().train_state –
TrainStateinstance. The second variable returned fromTrainer.train().issave (bool) – Set
True(default) to save the loss, training points, and testing points.isplot (bool) – Set
True(default) to plot loss, metric, and the predicted solution.loss_fname (string) – Name of the file to save the loss in.
train_fname (string) – Name of the file to save the training points in.
test_fname (string) – Name of the file to save the testing points in.
output_dir (string) – If
None, use the current working directory.