def _do_momentum_update(
    prev_params: Iterable[Parameter], params: Iterable[Parameter], m: float
) -> None:
    """Updates the weights of the previous parameters."""
    for prev_param, param in zip(prev_params, params):
        prev_param.data = prev_param.data * m + param.data * (1.0 - m)
Updates the weights of the previous parameters.
lightly/models/_momentum.py