Esempio n. 1
0
 def Task(cls):
     p = base_config.SetupTransformerParams(
         name='wmt14_en_de_transformer_base',
         vocab_size=cls.VOCAB_SIZE,
         model_dim=512,
         hidden_dim=2048,
         num_heads=8,
         num_layers=6,
         residual_dropout_prob=0.1,
         input_dropout_prob=0.1,
         learning_rate=3.0,
         warmup_steps=40000)
     p.eval.samples_per_summary = 7500
     return p
Esempio n. 2
0
 def Task(cls):
     p = base_config.SetupTransformerParams(
         name='wmt14_en_de_transformer_base',
         vocab_size=cls.VOCAB_SIZE,
         model_dim=256,
         hidden_dim=512,
         num_heads=2,
         num_layers=2,
         residual_dropout_prob=0.2,
         input_dropout_prob=0.2,
         learning_rate=1.0,
         warmup_steps=1000)
     p.eval.samples_per_summary = 7500
     p.train.save_interval_seconds = 60
     p.train.max_steps = 12000
     return p