diff --git a/ELMo/LAC_demo/network.py b/ELMo/LAC_demo/network.py index c982c2538b69e7cd7fcdf41485ee86330e552cd5..96471fa12b609a8cd728260c3f77a2f0f4dc29bc 100755 --- a/ELMo/LAC_demo/network.py +++ b/ELMo/LAC_demo/network.py @@ -9,6 +9,7 @@ import paddle.fluid as fluid from paddle.fluid.initializer import NormalInitializer import paddle.fluid.layers as layers from bilm import elmo_encoder +import ipdb def lex_net(args, word_dict_len, label_dict_len): diff --git a/ELMo/train.py b/ELMo/train.py index c8726f84962d4111d6dbbff39d20db0faa5ef0bb..c062df304c08e52736f3526e1da8ee06456c8773 100755 --- a/ELMo/train.py +++ b/ELMo/train.py @@ -555,6 +555,7 @@ def train_loop(args, valid_ppl = eval(vocab, infer_progs, dev_count, logger, args) logger.info("valid ppl {}".format(valid_ppl)) if batch_id > 0 and batch_id % args.save_interval == 0: + epoch_id = int(batch_id / n_batches_per_epoch) model_path = os.path.join(args.para_save_dir, str(batch_id + epoch_id)) if not os.path.isdir(model_path):