Skip to content

Commit

Permalink
Fix new
Browse files Browse the repository at this point in the history
  • Loading branch information
sgugger committed Feb 16, 2019
1 parent 0c0d748 commit 66f13df
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fastai/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ def create(cls, opt_func:Union[type,Callable], lr:Union[float,Tuple,List],
def new(self, layer_groups:Collection[nn.Module]):
"Create a new `OptimWrapper` from `self` with another `layer_groups` but the same hyper-parameters."
opt_func = getattr(self, 'opt_func', self.opt.__class__)
split_groups = split_no_wd_params(layer_groups)
opt = opt_func([{'params': trainable_params(l), 'lr':0} for l in split_groups])
res = self.create(opt_func, self.lr, layer_groups, wd=self.wd, true_wd=self.true_wd, bn_wd=self.bn_wd)
res.mom,res.beta = self.mom,self.beta
return res
Expand Down

0 comments on commit 66f13df

Please sign in to comment.