config.py 623 字节
Newer Older
C
caoying03 已提交
1 2 3 4 5 6 7 8
#!/usr/bin/env python
#coding=utf-8

__all__ = ["ModelConfig"]


class ModelConfig(object):
    beam_size = 3
C
caoying03 已提交
9 10
    vocab_size = 104808
    embedding_dim = 300
C
caoying03 已提交
11 12 13 14 15 16 17 18 19
    embedding_droprate = 0.3

    lstm_depth = 3
    lstm_hidden_dim = 300
    lstm_hidden_droprate = 0.3

    passage_indep_embedding_dim = 300
    passage_aligned_embedding_dim = 128

C
caoying03 已提交
20 21 22 23
    beam_size = 32

    dict_path = "data/featurized/vocab.txt"
    pretrained_emb_path = "data/featurized/embeddings.npy"
C
caoying03 已提交
24 25 26 27 28


class TrainerConfig(object):
    learning_rate = 1e-3
    data_dir = "data/featurized"
C
caoying03 已提交
29 30 31 32 33
    save_dir = "models"

    batch_size = 12 * 4

    epochs = 100