rfho/hyper_gradients.py
def create_hyperparameter_optimizers(rf_hyper_gradients, optimizer_class, **optimizers_kw_args):
    """
    Helper for creating descent procedure for hyperparameters

    :param rf_hyper_gradients: instance of `ForwardHG` or `ReverseHG` class
    :param optimizer_class:  callable for instantiating the single optimizers
    :param optimizers_kw_args: arguments to pass to `optimizer_creator`
    :return: List of `Optimizer` objects
    """
    assert issubclass(optimizer_class, Optimizer), '%s should be an Optimizer' % optimizer_class
    return [optimizer_class.create(hyp, **optimizers_kw_args, grad=hg, w_is_state=False)
            for hyp, hg in zip(rf_hyper_gradients.hyper_list, rf_hyper_gradients.hyper_gradient_vars)]

    Helper for creating descent procedure for hyperparameters

    :param rf_hyper_gradients: instance of `ForwardHG` or `ReverseHG` class
    :param optimizer_class:  callable for instantiating the single optimizers
    :param optimizers_kw_args: arguments to pass to `optimizer_creator`
    :return: List of `Optimizer` objects
    
Helper for creating descent procedure for hyperparameters
Helper for creating descent procedure for hyperparameters
def create_hyperparameter_optimizers(rf_hyper_gradients, optimizer_class, **optimizers_kw_args):
    assert issubclass(optimizer_class, Optimizer), '%s should be an Optimizer' % optimizer_class
    return [optimizer_class.create(hyp, **optimizers_kw_args, grad=hg, w_is_state=False)
            for hyp, hg in zip(rf_hyper_gradients.hyper_list, rf_hyper_gradients.hyper_gradient_vars)]
def create_hyperparameter_optimizers ( rf_hyper_gradients , optimizer_class , ** optimizers_kw_args ) : assert issubclass ( optimizer_class , Optimizer ) , '%s should be an Optimizer' % optimizer_class return [ optimizer_class . create ( hyp , ** optimizers_kw_args , grad = hg , w_is_state = False ) for hyp , hg in zip ( rf_hyper_gradients . hyper_list , rf_hyper_gradients . hyper_gradient_vars ) ]
Helper for creating descent procedure for hyperparameters
Helper for creating descent procedure for hyperparameters
"""
    Helper for creating descent procedure for hyperparameters

    :param rf_hyper_gradients: instance of `ForwardHG` or `ReverseHG` class
    :param optimizer_class:  callable for instantiating the single optimizers
    :param optimizers_kw_args: arguments to pass to `optimizer_creator`
    :return: List of `Optimizer` objects
    """
List of `Optimizer` objects
List of ` Optimizer ` objects
rf_hyper_gradients
instance of `ForwardHG` or `ReverseHG` class
instance of ` ForwardHG ` or ` ReverseHG ` class
optimizer_class
callable for instantiating the single optimizers
callable for instantiating the single optimizers
optimizers_kw_args
arguments to pass to `optimizer_creator`
arguments to pass to ` optimizer_creator `