torch.optim in the PyTorch documentation

ID: torch-optim-in-the-pytorch-documentation

Pinned PyTorch2.15. Taking an optimization step, optimizer.step() and closure examples; Optimizer base class and state. Gradient calculation and parameter update are separate operations. Existing SGD in the PyTorch documentation source is reused for the no-momentum, zero-weight-decay update formula.
Additional locator: PyTorch 2.15, Optimizer.state_dict, state and param_groups; parameter values are omitted, and saved parameter identifiers/order must be matched when restoring state.

New to topics? Read the docs here!