Visualization¶
Visualization utilities for training inspection.
plot_sequence ¶
Plot input, target, and optional prediction sequences on subplot axes.
Source code in tsfast/training/viz.py
plot_seqs_single_figure ¶
plot_seqs_single_figure(n_samples: int, n_targ: int, samples: list, plot_func: Callable, outs: list | None = None, **kwargs)
Plot multiple sample sequences in a single figure grid.
Source code in tsfast/training/viz.py
plot_seqs_multi_figures ¶
plot_seqs_multi_figures(n_samples: int, n_targ: int, samples: list, plot_func: Callable, outs: list | None = None, **kwargs)
Plot each sample sequence in its own separate figure.
Source code in tsfast/training/viz.py
layout_samples ¶
layout_samples(n_samples: int, n_targ: int, samples: list, plot_func: Callable, outs: list | None = None, **kwargs)
Dispatch to single or multi figure layout based on sample count.
Source code in tsfast/training/viz.py
plot_grad_flow ¶
Plot gradient flow through network layers.
Useful for checking gradient vanishing/exploding. Call multiple times for transparent overlays representing the mean gradients.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
named_parameters
|
Iterator
|
iterator of (name, parameter) pairs from a model |
required |
Source code in tsfast/training/viz.py
grad_norm ¶
Compute the total gradient norm across all parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameters
|
iterable of model parameters |
required |