chainer.training.extensions.snapshot_writers.ProcessWriter¶
-
class
chainer.training.extensions.snapshot_writers.
ProcessWriter
(savefun=<function save_npz>, **kwds)[source]¶ Snapshot writer that uses a separate process.
This class creates a new process that invokes the actual saving function.
Note
Forking a new process from a MPI process might be danger. Consider using
ThreadWriter
instead ofProcessWriter
if you are using MPI.Methods
-
__call__
(filename, outdir, target)[source]¶ Invokes the actual snapshot function.
This method is invoked by a
Snapshot
object every time it takes a snapshot.
-
create_worker
(filename, outdir, target, **kwds)[source]¶ Creates a worker for the snapshot.
This method creates a thread or a process to take a snapshot. The created worker must have
start()
andjoin()
methods.
-
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.
-