espnet.asr.asr_utils.snapshot_object
Less than 1 minute
espnet.asr.asr_utils.snapshot_object
espnet.asr.asr_utils.snapshot_object(target, filename)
Return a trainer extension to take snapshots of a given object.
- Parameters:
- target (model) – Object to serialize.
- filename (str) – Name of the file into which the object is serialized.It can be a format string, where the trainer object is passed to the :meth: str.format method. For example,
'snapshot_{.updater.iteration}'
is converted to'snapshot_10000'
at the 10,000th iteration.
- Returns: An extension function.