Table Of Contents
Table Of Contents

KVStore.save_optimizer_states

KVStore.save_optimizer_states(fname, dump_optimizer=False)[source]

Saves the optimizer (updater) state to a file. This is often used when checkpointing the model during training.

Parameters:
  • fname (str) – Path to the output states file.
  • dump_optimizer (bool, default False) – Whether to also save the optimizer itself. This would also save optimizer information such as learning rate and weight decay schedules.