Skip to content

Plotter¤

Plotter generates diagnostic plots (loss curve, learning-rate schedule) during and after training. All figures are saved as PNG files so they work in headless / HPC environments.

Plotter¤

nnfe.plotter.Plotter ¤

Generates and saves diagnostic plots for an NNFE training run.

Parameters:

Name Type Description Default
config

:class:~nnfe.nnfe_config.PlotterConfig instance.

required
save_dir

Directory path for saving plot files. Should be a :class:pathlib.Path.

None

Attributes:

Name Type Description
config

:class:~nnfe.nnfe_config.PlotterConfig controlling which plots are produced.

save_dir

Directory where PNG files are written. If None saving is skipped (no plots are generated).

plot_loss(loss_vec) ¤

Plot the training loss on a log scale and save to loss.png.

Parameters:

Name Type Description Default
loss_vec

1-D NumPy array of per-epoch loss values.

required
plot_learning_rate(scheduler, epochs) ¤

Plot the learning-rate schedule on a log scale and save to lr.png.

Parameters:

Name Type Description Default
scheduler

An Optax schedule callable (step: int) -> float.

required
epochs

Total number of training epochs; determines the x-axis range.

required
plot_grad() ¤

Placeholder for gradient-norm diagnostics (not yet implemented).