예제 #1
0
 def __init__(self,
              alpha=0.001,
              beta_1=0.9,
              beta_2=0.999,
              eps=1e-8,
              update_every: int = 1,
              skip_noisy: bool = False):
     super().__init__(optimizer=dy.AdamTrainer(
         ParamManager.global_collection(), alpha, beta_1, beta_2, eps),
                      skip_noisy=skip_noisy)
예제 #2
0
 def __init__(self,
              alpha=1.0,
              dim=512,
              warmup_steps=4000,
              beta_1=0.9,
              beta_2=0.98,
              eps=1e-9):
     self.optimizer = dy.AdamTrainer(ParamManager.global_collection(),
                                     alpha=alpha,
                                     beta_1=beta_1,
                                     beta_2=beta_2,
                                     eps=eps)
     self.dim = dim
     self.warmup_steps = warmup_steps
     self.steps = 0
예제 #3
0
 def __init__(self,
              alpha=1.0,
              dim=512,
              warmup_steps=4000,
              beta_1=0.9,
              beta_2=0.98,
              eps=1e-9,
              skip_noisy: bool = False):
     super().__init__(optimizer=dy.AdamTrainer(
         ParamManager.global_collection(),
         alpha=alpha,
         beta_1=beta_1,
         beta_2=beta_2,
         eps=eps),
                      skip_noisy=skip_noisy)
     self.dim = dim
     self.warmup_steps = warmup_steps
     self.steps = 0
예제 #4
0
 def __init__(self, eps=1e-6, rho=0.95, skip_noisy: bool = False):
     super().__init__(optimizer=dy.AdadeltaTrainer(
         ParamManager.global_collection(), eps, rho),
                      skip_noisy=skip_noisy)
예제 #5
0
 def __init__(self, e0=0.1, eps=1e-20, skip_noisy: bool = False):
     super().__init__(optimizer=dy.AdagradTrainer(
         ParamManager.global_collection(), e0, eps=eps),
                      skip_noisy=skip_noisy)
예제 #6
0
 def __init__(self, e0=0.01, mom=0.9, skip_noisy: bool = False):
     super().__init__(optimizer=dy.MomentumSGDTrainer(
         ParamManager.global_collection(), e0, mom),
                      skip_noisy=skip_noisy)
예제 #7
0
 def __init__(self, e0=0.1, skip_noisy: bool = False):
     super().__init__(optimizer=dy.SimpleSGDTrainer(
         ParamManager.global_collection(), e0),
                      skip_noisy=skip_noisy)
예제 #8
0
 def __init__(self, e0=0.01, mom=0.9):
     self.optimizer = dy.MomentumSGDTrainer(
         ParamManager.global_collection(), e0, mom)
예제 #9
0
 def __init__(self, e0=0.1):
     self.optimizer = dy.SimpleSGDTrainer(ParamManager.global_collection(),
                                          e0)
예제 #10
0
 def __init__(self, alpha=0.001, beta_1=0.9, beta_2=0.999, eps=1e-8):
     self.optimizer = dy.AdamTrainer(ParamManager.global_collection(),
                                     alpha, beta_1, beta_2, eps)
예제 #11
0
 def __init__(self, eps=1e-6, rho=0.95):
     self.optimizer = dy.AdadeltaTrainer(ParamManager.global_collection(),
                                         eps, rho)
예제 #12
0
 def __init__(self, e0=0.1, eps=1e-20):
     self.optimizer = dy.AdagradTrainer(ParamManager.global_collection(),
                                        e0,
                                        eps=eps)