def main():

    # print("创建模型")
    # matchpyramid_0 = model_v4.MPyramid(x1_max_length=X1_MAX_LENGTH, x2_max_length=X2_MAX_LENGTH, vocab_size=vocab_size, embedding_size=embedding_size, class_nums=2, learning_rate=1e-3)
    # matchpyramid_1 = model_v4.MPyramid(x1_max_length=X1_MAX_LENGTH, x2_max_length=X2_MAX_LENGTH, vocab_size=vocab_size,embedding_size=embedding_size, class_nums=2, learning_rate=1e-3)
    # matchpyramid_2 = model_v4.MPyramid(x1_max_length=X1_MAX_LENGTH, x2_max_length=X2_MAX_LENGTH, vocab_size=vocab_size,embedding_size=embedding_size, class_nums=2, learning_rate=1e-3)
    # matchpyramid_3 = model_v4.MPyramid(x1_max_length=X1_MAX_LENGTH, x2_max_length=X2_MAX_LENGTH, vocab_size=vocab_size,embedding_size=embedding_size, class_nums=2, learning_rate=1e-3)
    # matchpyramid_4 = model_v4.MPyramid(x1_max_length=X1_MAX_LENGTH, x2_max_length=X2_MAX_LENGTH, vocab_size=vocab_size,embedding_size=embedding_size, class_nums=2, learning_rate=1e-3)
    # matchpyramid_5 = model_v4.MPyramid(x1_max_length=X1_MAX_LENGTH, x2_max_length=X2_MAX_LENGTH, vocab_size=vocab_size,embedding_size=embedding_size, class_nums=2, learning_rate=1e-3)
    matchpyramid_6 = model_v4.MPyramid(x1_max_length=X1_MAX_LENGTH,
                                       x2_max_length=X2_MAX_LENGTH,
                                       vocab_size=vocab_size,
                                       embedding_size=embedding_size,
                                       class_nums=2,
                                       learning_rate=1e-3)

    # print("开始训练 model__0 ....")
    # train(matchpyramid_0, model_number=0)
    # print("开始训练 model__1 ....")
    # train(matchpyramid_1, model_number=1)
    # print("开始训练 model__2 ....")
    # train(matchpyramid_2, model_number=2)
    # print("开始训练 model__3 ....")
    # train(matchpyramid_3, model_number=3)
    # print("开始训练 model__4 ....")
    # train(matchpyramid_4, model_number=4)
    # print("开始训练 model__5 ....")
    # train(matchpyramid_5, model_number=5)
    print("开始训练 model__6 ....")
    train(matchpyramid_6, model_number=6)

    return
예제 #2
0
def main():

    print("创建模型")
    matchpyramid = model_v4.MPyramid(x1_max_length=X1_MAX_LENGTH,
                                     x2_max_length=X2_MAX_LENGTH,
                                     vocab_size=vocab_size,
                                     embedding_size=embedding_size,
                                     class_nums=2,
                                     learning_rate=1e-3)

    print("开始训练")
    train(matchpyramid)

    return