Skip to content

Commit

Permalink
_LRSchedulers getstate include optimizer info (pytorch#7757)
Browse files Browse the repository at this point in the history
* getstate should include optimizer

* remove getstate/setstate functions
  • Loading branch information
ailzhang authored and soumith committed May 23, 2018
1 parent e3e15b5 commit 5a3f781
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions torch/optim/lr_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ def __init__(self, optimizer, last_epoch=-1):
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`.
Expand Down

0 comments on commit 5a3f781

Please sign in to comment.