abstract Learner.apply_gradients(gradients_dict: Dict[Hashable, torch.Tensor | tf.Variable]) None[source]#

Applies the gradients to the MultiAgentRLModule parameters.


gradients_dict – A dictionary of gradients in the same (flat) format as self._params. Note that top-level structures, such as module IDs, will not be present anymore in this dict. It will merely map gradient tensor references to gradient tensors.