def __init__(self, config, params): self.config = config self.params = params self.gc = [tools.init_zeros(p.get_value().shape) for p in params] self.m = [tools.init_zeros(p.get_value().shape) for p in params] self.v = [tools.init_zeros(p.get_value().shape) for p in params] self.beta1t = theano.shared(numpy.float32(config['beta1_adam'])) self.beta2t = theano.shared(numpy.float32(config['beta2_adam']))
def __init__(self, config, params): self.config = config self.params = params self.gc = [tools.init_zeros(p.get_value().shape) for p in params] self.g2 = [tools.init_zeros(p.get_value().shape) for p in params] self.u2 = [tools.init_zeros(p.get_value().shape) for p in params]