Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sgugger committed Mar 25, 2020
1 parent 9a32a5f commit 8d9d310
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastai/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def lr(self, val:float)->None:
self._lr = self.set_val('lr', listify(val, self._lr))

@property
def mom(self)->float:return self._mom[-1]
def mom(self)->float:return self._mom[-1] if self._mom is not None else None
@mom.setter
def mom(self, val:float)->None:
if 'momentum' in self.opt_keys: self.set_val('momentum', listify(val, self._mom))
Expand Down

0 comments on commit 8d9d310

Please sign in to comment.