Exemplo n.º 1
0
Arquivo: main.py Projeto: clover3/NLI
def train_cafe():
    voca = load_voca()
    args.char_vocab_size = load_char_length()
    model = Manager(max_sequence=100, word_indice=voca,
                    batch_size=args.batch_size, num_classes=3, vocab_size=1000,
                    embedding_size=300, lstm_dim=1024)
    data = models.common.load_pickle("train_corpus.pickle")
    validate = models.common.load_pickle("dev_corpus")
    epochs = 30
    model.train(epochs, data, validate)
Exemplo n.º 2
0
Arquivo: main.py Projeto: clover3/NLI
def train_keep_cafe():
    voca = load_voca()
    manager = Manager(max_sequence=100, word_indice=voca,
                      batch_size=args.batch_size, num_classes=3,
                      vocab_size=1000, embedding_size=300, lstm_dim=1024)
    # Dev acc=0.6576999819278717 loss=0.8433943867683411
    data = models.common.load_pickle("train_corpus.pickle")
    validate = models.common.load_pickle("dev_corpus")

    manager.load("model-15340")
    manager.train(20, data, validate, True)