chainer.training.extensions.snapshot_writers.QueueWriter¶
-
class
chainer.training.extensions.snapshot_writers.QueueWriter(savefun=<function save_npz>, task=None)[source]¶ Base class of queue snapshot writers.
This class is a base class of snapshot writers that use a queue. A Queue is created when this class is constructed, and every time when
__call__is invoked, a snapshot task is put into the queue.- Parameters
savefun – Callable object which is passed to the
create_task()if the task isNone. It takes three arguments: the output file path, the serialized dictionary object, and the optional keyword arguments.task – Callable object. Its
__call__must have a same interface toWriter.__call__. This object is directly put into the queue.
Methods
-
__call__(filename, outdir, target)[source]¶ Invokes the actual snapshot function.
This method is invoked by a
Snapshotobject every time it takes a snapshot.
-
finalize()[source]¶ Finalizes the wirter.
Like extensions in
Trainer, this method is invoked at the end of the training.
-
__eq__()¶ Return self==value.
-
__ne__()¶ Return self!=value.
-
__lt__()¶ Return self<value.
-
__le__()¶ Return self<=value.
-
__gt__()¶ Return self>value.
-
__ge__()¶ Return self>=value.