Module monk.pytorch.optimizers.retrieve_optimizer
Expand source code
from pytorch.optimizers.imports import *
from system.imports import *
def retrieve_optimizer(system_dict):
'''
Retrieve Optimizers in validation, testing, copy-from and resume modes
Args:
system_dict (dict): System dictionary storing experiment state and set variables
Returns:
dict: updated system dict
'''
system_dict["local"]["optimizer"] = system_dict["hyper-parameters"]["optimizer"]["name"];
return system_dict;
Functions
def retrieve_optimizer(system_dict)
-
Retrieve Optimizers in validation, testing, copy-from and resume modes
Args
system_dict
:dict
- System dictionary storing experiment state and set variables
Returns
dict
- updated system dict
Expand source code
def retrieve_optimizer(system_dict): ''' Retrieve Optimizers in validation, testing, copy-from and resume modes Args: system_dict (dict): System dictionary storing experiment state and set variables Returns: dict: updated system dict ''' system_dict["local"]["optimizer"] = system_dict["hyper-parameters"]["optimizer"]["name"]; return system_dict;