code: def on_step_end(self, **kwargs:Any)->None:
          "Update the params from master to model and zero grad."
          #Zeros the gradients of the model since the optimizer is disconnected.
          self.learn.model.zero_grad()
          #Update the params from master to model.
          master2model(self.model_params, self.master_params, self.flat_masterf on_step_end(self, **kwargs:Any)->None:
          "Update the params from master to model and zero grad."
          #Zeros the gradients of the model since the optimizer is disconnected.
          self.learn.model.zero_grad()
          #Update the params from master to model.
          master2model(self.model_params, self.master_params, self.flat_master)
docs: Update the params from master to model and zero grad.