def test_lamb(test_case):
    arg_dict = OrderedDict()
    arg_dict['device'] = ['cpu', 'cuda']
    arg_dict['x_shape'] = [(10,)]
    arg_dict['learning_rate'] = [0.1, 0.001]
    arg_dict['train_iters'] = [10]
    arg_dict['betas'] = [(0.99, 0.9)]
    arg_dict['weight_decay'] = [0.001, 0.1]
    arg_dict['eps'] = [1e-08, 1e-06]
    arg_dict['do_bias_correction'] = [True, False]
    arg_dict['adam_w_mode'] = [True, False]
    arg_dict['clip_grad_max_norm'] = [(- 1), 1.0]
    arg_dict['clip_grad_norm_type'] = [2.0]
    for arg in GenArgList(arg_dict):
        compare_with_numpy_lamb(test_case, *arg)
def test_lamb(test_case):
    arg_dict = OrderedDict()
    arg_dict['device'] = ['cpu', 'cuda']
    arg_dict['x_shape'] = [(10,)]
    arg_dict['learning_rate'] = [0.1, 0.001]
    arg_dict['train_iters'] = [10]
    arg_dict['betas'] = [(0.99, 0.9)]
    arg_dict['weight_decay'] = [0.001, 0.1]
    arg_dict['eps'] = [1e-08, 1e-06]
    arg_dict['do_bias_correction'] = [True, False]
    arg_dict['adam_w_mode'] = [True, False]
    arg_dict['clip_grad_max_norm'] = [(- 1), 1.0]
    arg_dict['clip_grad_norm_type'] = [2.0]
    for arg in GenArgList(arg_dict):
        compare_with_numpy_lamb(test_case, *arg)