def __init__(self, params, lr=None, momentum=0, dampening=0, weight_decay=0, nesterov=False, trust_coefficient=0.001, eps=1e-08):
    if ((lr is None) or (lr < 0.0)):
        raise ValueError(f'Invalid learning rate: {lr}')
    if (momentum < 0.0):
        raise ValueError(f'Invalid momentum value: {momentum}')
    if (weight_decay < 0.0):
        raise ValueError(f'Invalid weight_decay value: {weight_decay}')
    defaults = dict(lr=lr, momentum=momentum, dampening=dampening, weight_decay=weight_decay, nesterov=nesterov, trust_coefficient=trust_coefficient, eps=eps)
    if (nesterov and ((momentum <= 0) or (dampening != 0))):
        raise ValueError('Nesterov momentum requires a momentum and zero dampening')
    super().__init__(params, defaults)
def __init__(self, params, lr=None, momentum=0, dampening=0, weight_decay=0, nesterov=False, trust_coefficient=0.001, eps=1e-08):
    if ((lr is None) or (lr < 0.0)):
        raise ValueError(f'Invalid learning rate: {lr}')
    if (momentum < 0.0):
        raise ValueError(f'Invalid momentum value: {momentum}')
    if (weight_decay < 0.0):
        raise ValueError(f'Invalid weight_decay value: {weight_decay}')
    defaults = dict(lr=lr, momentum=momentum, dampening=dampening, weight_decay=weight_decay, nesterov=nesterov, trust_coefficient=trust_coefficient, eps=eps)
    if (nesterov and ((momentum <= 0) or (dampening != 0))):
        raise ValueError('Nesterov momentum requires a momentum and zero dampening')
    super().__init__(params, defaults)