ns_sdn.engine._internals#

Mechanism layer: the network, the trainer, the predictor, the family base.

Torch is confined to _modules, _objectives, _trainers and _predictors; the fit record and the public result see numpy only. Read in dependency order:

  • _modules – the nn.Module: transition, heads, synthesis, the teacher-forced and recursive passes.

  • _objectives – the criterion: prediction loss plus penalties.

  • _trainers – the staged Adam loop and the history record.

  • _predictors – the trained network behind a numpy interface, the alignment’s input layout, pickling.

  • _fits – the raw fit record.

  • _models – the model bases that validate a specification and run the pipeline.

  • _mixins – rendering, frame interop and comparison for results.

Example

>>> from ns_sdn.engine import _internals
>>> _internals.__all__
['_fits', '_mixins', '_models', '_modules', '_objectives', '_predictors', '_trainers']

Constants and defaults#

_fits

Fit records: the raw output of an estimator, before result assembly.

_mixins

Behavior mixins: capabilities a frozen result opts into.

_models

Protected base classes for model specifications.

_modules

The torch network: latent transition, spectral emission heads, synthesis.

_objectives

The training criterion: a prediction loss plus drift and sparsity penalties.

_predictors

The fitted network as a numpy-facing object.

_trainers

Staged full-sequence training.