Skip to content

Commit

Permalink
fix: Fixed norm wd
Browse files Browse the repository at this point in the history
  • Loading branch information
frgfm committed Nov 6, 2021
1 parent 30cdf82 commit 670317b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion holocron/trainer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ def _set_params(self, norm_weight_decay: Optional[float] = None) -> None:
self._params = [ContiguousParams([p for p in self.model.parameters() if p.requires_grad])]
else:
self._params = [
ContiguousParams(_params) for _params in split_normalization_params(self.model)
ContiguousParams(_params) if len(_params) > 0 else None
for _params in split_normalization_params(self.model)
]

def _reset_opt(self, lr: float, norm_weight_decay: Optional[float] = None) -> None:
Expand Down

0 comments on commit 670317b

Please sign in to comment.