API reference¶
These pages are generated from the docstrings in the source. They list the public classes, functions and methods; names that start with an underscore are left out. The guides show how the pieces fit together, and Configuration keys lists every configuration key.
The package re-exports the four names a training script needs:
from torchsonn import SONN, SONNConfig, SONNDataset, Trainer
from torchsonn.plot_model import PlotModel # needs the viz extra
PlotModel is not re-exported, because it imports graphviz, which a
base install does not have.
| Page | Contents |
|---|---|
| SONN | the model, its layers and the layer-creation error |
| Trainer | training, the head and fine-tune passes, pruning, prediction, checkpoints, the growth rule, logging |
| Data | SONNDataset and the deterministic split helpers |
| Neurons | the neuron families and their base classes |
| Losses and criteria | the training loss and the criterion functions |
| Modules | the squash and the soft binner |
| Optimizers | the batched optimizers of the candidate fit |
| Plotting | the network diagram |
| Configuration | the configuration schema's classes |
Checked against TorchSONN 0.1.5.