Base class of snapshot writers.

Snapshot invokes __call__ of this class everytime when taking a snapshot. This class determines how the actual saving function will be invoked.


__call__(filename, outdir, target)[source]

Invokes the actual snapshot function.

This method is invoked by a Snapshot object every time it takes a snapshot.

  • filename (str) – Name of the file into which the serialized target is saved. It is a concrete file name, i.e. not a pre-formatted template string.

  • outdir (str) – Output directory. Corresponds to Trainer.out.

  • target (dict) – Serialized object which will be saved.


Finalizes the wirter.

Like extensions in Trainer, this method is invoked at the end of the training.

save(filename, outdir, target, savefun, **kwds)[source]

Return self==value.


Return self!=value.


Return self<value.


Return self<=value.


Return self>value.


Return self>=value.