Ejemplo n.º 1
0
def main(path):
    train, test, valid = read_data(path)
    model = build_model().fit(train)

    model[-1].set_params(batch_size=32)
    evaluate(model, train.sample(frac=0.015), "train")
    evaluate(model, valid.sample(frac=0.1), "valid")
Ejemplo n.º 2
0
def main(path):
    train, test, valid = read_data(path)

    with timer("Fit the data"):
        model = build_model().fit(train)

    evaluate(model, valid, "validatoin")
    evaluate(model, test, "test")
Ejemplo n.º 3
0
def main(path):
    train, test, valid = read_data(path)
    data = ev_data(train["text"])

    print(data)
    model = build_model(ev_data(valid["text"])).fit(data)

    evaluate(model, test.sample(frac=0.1), "test")
    evaluate(model, valid, "valid")
    evaluate(model, train, "train")
Ejemplo n.º 4
0
def main(path):
    train, test, valid = read_data(path)
    data = ev_data(train["text"])

    print(data)
    model = build_model(ev_data(valid["text"])).fit(data)

    model[-1].set_params(batch_size=32)

    evaluate(model, test, "test")
    evaluate(model, valid, "valid")
    evaluate(model, train, "train")