Learner.get_optimizers_for_module(module_id: str = '__all__') List[Tuple[str, torch.optim.Optimizer | tf.keras.optimizers.Optimizer]][source]#

Returns a list of (optimizer_name, optimizer instance)-tuples for module_id.


module_id – The ModuleID for which to return the configured (optimizer name, optimizer)-pairs. If not provided, will return optimizers registered under ALL_MODULES.


([optimizer_name], [optimizer object]), where optimizer_name is the name under which the optimizer was registered in self.register_optimizer. If only a single optimizer was configured for module_id, [optimizer_name] will be DEFAULT_OPTIMIZER.

Return type:

A list of tuples of the format