pytorch / 1 / generated / torch.optim.optimizer.state_dict.html

torch.optim.Optimizer.state_dict

Optimizer.state_dict() [source]

Returns the state of the optimizer as a dict.

It contains two entries:

  • state - a dict holding current optimization state. Its content

    differs between optimizer classes.

  • param_groups - a list containing all parameter groups where each

    parameter group is a dict

© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/1.13/generated/torch.optim.Optimizer.state_dict.html