summaryrefslogtreecommitdiff
path: root/torch/optim
diff options
context:
space:
mode:
authorAiling <ailzhang@users.noreply.github.com>2018-05-23 23:43:42 +0800
committerSoumith Chintala <soumith@gmail.com>2018-05-23 11:43:42 -0400
commit5a3f7810f8d23b733d7e9b167348b873c2d9fdf1 (patch)
tree984c30d603c5a30fd65e8d3e505a910a63909704 /torch/optim
parente3e15b5d9534f1c10170e169f1423e9298648e86 (diff)
downloadpytorch-5a3f7810f8d23b733d7e9b167348b873c2d9fdf1.tar.gz
pytorch-5a3f7810f8d23b733d7e9b167348b873c2d9fdf1.tar.bz2
pytorch-5a3f7810f8d23b733d7e9b167348b873c2d9fdf1.zip
_LRSchedulers getstate include optimizer info (#7757)
* getstate should include optimizer * remove getstate/setstate functions
Diffstat (limited to 'torch/optim')
-rw-r--r--torch/optim/lr_scheduler.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/torch/optim/lr_scheduler.py b/torch/optim/lr_scheduler.py
index f1bef0d84b..b40a075809 100644
--- a/torch/optim/lr_scheduler.py
+++ b/torch/optim/lr_scheduler.py
@@ -22,12 +22,6 @@ class _LRScheduler(object):
self.step(last_epoch + 1)
self.last_epoch = last_epoch
- def __getstate__(self):
- return self.state_dict()
-
- def __setstate__(self, state):
- self.load_state_dict(state)
-
def state_dict(self):
"""Returns the state of the scheduler as a :class:`dict`.