[DOC] improve docstring for Optimizer.state_dict (#63153)
authorTugsbayasgalan (Tugsuu) Manlaibaatar <tmanlaibaatar@fb.com>
Sun, 29 Aug 2021 17:19:56 +0000 (10:19 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Sun, 29 Aug 2021 17:20:58 +0000 (10:20 -0700)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63153

Fixes: https://github.com/pytorch/pytorch/issues/60121

Test Plan: Imported from OSS

Reviewed By: pbelevich

Differential Revision: D30629462

Pulled By: tugsbayasgalan

fbshipit-source-id: a9160e02ac53bb1a6219879747d73aae9ebe4d2f

torch/optim/optimizer.py

index 02f1cc2..79f72f0 100644 (file)
@@ -100,7 +100,8 @@ class Optimizer(object):
 
         * state - a dict holding current optimization state. Its content
             differs between optimizer classes.
-        * param_groups - a dict containing all parameter groups
+        * param_groups - a list containing all parameter groups where each
+            parameter group is a dict
         """
         # Save order indices instead of Tensors
         param_mappings = {}