def update_average_model(self, model):
for model_param, average_param in zip(model.parameters(), self.average_model.parameters()):<EOL><INDENT>average_param.data.mul_(self.average_model_alpha).add_(model_param.data * (<NUM_LIT:1> - self.average_model_alpha))<EOL><DEDENT>
Update weights of the average model with new model observation