Skip to content
Snippets Groups Projects
Unverified Commit e470c3aa authored by RangiLyu's avatar RangiLyu Committed by GitHub
Browse files

[Fix]: fix SWA in pytorch 1.6 (#312)

parent bc763758
No related branches found
No related tags found
No related merge requests found
...@@ -129,7 +129,7 @@ class StochasticWeightAverage(BaseAveragedModel): ...@@ -129,7 +129,7 @@ class StochasticWeightAverage(BaseAveragedModel):
""" """
averaged_param.add_( averaged_param.add_(
source_param - averaged_param, source_param - averaged_param,
alpha=1 / (steps // self.interval + 1)) alpha=1 / float(steps // self.interval + 1))
@MODELS.register_module() @MODELS.register_module()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment