Fix bug where LM was always intialized as QRNN despite the paramters.

This commit is contained in:
Piotr Czapla
2018-11-16 19:50:36 +01:00
parent f0e538f621
commit 977a506cfd
+1 -1
View File
@@ -111,7 +111,7 @@ def pretrain_lm(dir_path, lang='en', cuda_id=0, qrnn=True, clean=True, max_vocab
fastai.text.learner.default_dropout['language'] = dps
learn = language_model_learner(data_lm, bptt=bptt, emb_sz=emb_sz, nh=nh, nl=nl, pad_token=1,
drop_mult=drop_mult, tie_weights=True, model_dir=model_dir,
bias=True, qrnn=True, clip=0.12)
bias=True, qrnn=qrnn, clip=0.12)
# compared to standard Adam, we set beta_1 to 0.8
learn.opt_fn = partial(optim.Adam, betas=(0.8, 0.99))
learn.true_wd = False