예제 #1
0
    def __init__(self, params, grads, alpha=0.0002, beta1=0.1, beta2=0.001):
        self.params = params
        self.grads = grads

        self.m = Vars.create_from(params)
        self.u_comp = Vars.create_from(params)
        self.u = 0.0
        self.t = 0

        self.alpha = alpha
        self.beta1 = beta1
        self.beta2 = beta2
예제 #2
0
    def __init__(self, params, grads, alpha=0.002, beta1=0.9, beta2=0.999, eps=1e-8):
        #def __init__(self, params, grads, alpha=0.0002, beta1=0.1, beta2=0.001, eps=1e-8):
        self.params = params
        self.grads = grads

        self.m = Vars.create_from(params)
        self.v = Vars.create_from(params)
        self.t = 0

        self.alpha = alpha
        self.beta1 = beta1
        self.beta2 = beta2
        self.eps = eps