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")
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")
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")
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")