rfho/hyper_gradients.py
def positivity(hyper_list):
    """
    Simple positivity constraints for a list of hyperparameters

    :param hyper_list: single variable or list of variable (hyperparameters)
    :return: single or list of assign ops, one for each variable in `hyper_list`
    """
    lst = [hyp.assign(tf.maximum(hyp, tf.zeros_like(hyp))) for hyp in as_list(hyper_list)]
    return lst if len(lst) > 1 else lst[0]

    Simple positivity constraints for a list of hyperparameters

    :param hyper_list: single variable or list of variable (hyperparameters)
    :return: single or list of assign ops, one for each variable in `hyper_list`
    
Simple positivity constraints for a list of hyperparameters
Simple positivity constraints for a list of hyperparameters
def positivity(hyper_list):
    lst = [hyp.assign(tf.maximum(hyp, tf.zeros_like(hyp))) for hyp in as_list(hyper_list)]
    return lst if len(lst) > 1 else lst[0]
def positivity ( hyper_list ) : lst = [ hyp . assign ( tf . maximum ( hyp , tf . zeros_like ( hyp ) ) ) for hyp in as_list ( hyper_list ) ] return lst if len ( lst ) > 1 else lst [ 0 ]
Simple positivity constraints for a list of hyperparameters
Simple positivity constraints for a list of hyperparameters
"""
    Simple positivity constraints for a list of hyperparameters

    :param hyper_list: single variable or list of variable (hyperparameters)
    :return: single or list of assign ops, one for each variable in `hyper_list`
    """
single or list of assign ops, one for each variable in `hyper_list`
single or list of assign ops one for each variable in ` hyper_list `
hyper_list
single variable or list of variable (hyperparameters)
single variable or list of variable ( hyperparameters )