Remove bidir

This commit is contained in:
Piotr Czapla
2019-02-15 01:16:37 +01:00
parent 5e44e442b2
commit 5dced1e488
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -206,7 +206,7 @@ class LMHyperParams:
def create_lm_learner(self, data_lm, dps=None, **kwargs):
assert self.bidir == False, "bidirectional model is not yet supported"
config = dict(emb_sz=self.emb_sz, n_hid=self.nh, n_layers=self.nl, pad_token=PAD_TOKEN_ID, qrnn=self.qrnn, bidir=self.bidir,
config = dict(emb_sz=self.emb_sz, n_hid=self.nh, n_layers=self.nl, pad_token=PAD_TOKEN_ID, qrnn=self.qrnn,
tie_weights=True, out_bias=True)
config.update(dps or self.dps)
trn_args = dict(clip=self.clip, alpha=self.rnn_alpha, beta=self.rnn_beta)
+1 -1
View File
@@ -93,7 +93,7 @@ class CLSHyperParams(LMHyperParams):
def create_cls_learner(self, data_clas, dps=None, **kwargs):
assert self.bidir == False, "bidirectional model is not yet supported"
config = dict(emb_sz=self.emb_sz, n_hid=self.nh, n_layers=self.nl, pad_token=PAD_TOKEN_ID, qrnn=self.qrnn, bidir=self.bidir)
config = dict(emb_sz=self.emb_sz, n_hid=self.nh, n_layers=self.nl, pad_token=PAD_TOKEN_ID, qrnn=self.qrnn)
config.update(dps or self.dps)
trn_args=dict(bptt=self.bptt, clip=self.clip)
trn_args.update(kwargs)