Commit 587ca35d authored by 赵威's avatar 赵威

add logger

parent 14de04d8
......@@ -21,6 +21,8 @@ from models.esmm.model import esmm_model_fn, model_export, model_predict_diary
def main():
time_begin = time.time()
tf.logging.set_verbosity(tf.logging.INFO)
device_df, diary_df, click_df, conversion_df = read_csv_data(Path("~/data/cvr_data/"))
# print(diary_df.sample(1))
device_df = device_feature_engineering(device_df)
......@@ -40,6 +42,7 @@ def main():
shutil.rmtree(model_path)
model = tf.estimator.Estimator(model_fn=esmm_model_fn, params=params, model_dir=model_path)
# tf.estimator.train_and_evaluate
model.train(input_fn=lambda: esmm_input_fn(train_df, shuffle=True))
metrics = model.evaluate(input_fn=lambda: esmm_input_fn(val_df, False))
print("metrics: " + str(metrics))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment