ray.rllib.core.learner.learner.Learner.apply_gradients#

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

Applies the gradients to the MultiAgentRLModule parameters.

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.