def soft_update(self, local_model, target_model, tau):
    'Soft update model parameters.\n        θ_target = τ*θ_local + (1 - τ)*θ_target\n\n        Params\n        ======\n            local_model (PyTorch model): weights will be copied from\n            target_model (PyTorch model): weights will be copied to\n            tau (float): interpolation parameter \n        '
    for (target_param, local_param) in zip(target_model.parameters(), local_model.parameters()):
        target_param.data.copy_(((tau * local_param.data) + ((1.0 - tau) * target_param.data)))
Soft update model parameters.
θ_target = τ*θ_local + (1 - τ)*θ_target

Params
======
    local_model (PyTorch model): weights will be copied from
    target_model (PyTorch model): weights will be copied to
    tau (float): interpolation parameter
def soft_update(self, local_model, target_model, tau):
    'Soft update model parameters.\n        θ_target = τ*θ_local + (1 - τ)*θ_target\n\n        Params\n        ======\n            local_model (PyTorch model): weights will be copied from\n            target_model (PyTorch model): weights will be copied to\n            tau (float): interpolation parameter \n        '
    for (target_param, local_param) in zip(target_model.parameters(), local_model.parameters()):
        target_param.data.copy_(((tau * local_param.data) + ((1.0 - tau) * target_param.data)))