allow for mixed precision training with fp16 flag

This commit is contained in:
Phil Wang
2020-09-08 17:26:23 -07:00
parent 88f83d0ff2
commit 4bf28914bc
3 changed files with 49 additions and 12 deletions
+2 -1
View File
@@ -66,7 +66,8 @@ trainer = Trainer(
train_lr = 2e-5,
train_num_steps = 100000, # total training steps
gradient_accumulate_every = 2, # gradient accumulation steps
ema_decay = 0.995 # exponential moving average decay
ema_decay = 0.995, # exponential moving average decay
fp16 = True # turn on mixed precision training with apex
)
trainer.train()