StochasticWeightAverage¶
- class mmengine.model.StochasticWeightAverage(model, interval=1, device=None, update_buffers=False)[源代码]¶
Implements the stochastic weight averaging (SWA) of the model.
Stochastic Weight Averaging was proposed in Averaging Weights Leads to Wider Optima and Better Generalization, UAI 2018. by Pavel Izmailov, Dmitrii Podoprikhin, Timur Garipov, Dmitry Vetrov and Andrew Gordon Wilson.
- 参数
model (torch.nn.modules.module.Module) –
interval (int) –
device (Optional[torch.device]) –
update_buffers (bool) –
- 返回类型