Commit 3f5db70e authored by 赵威's avatar 赵威

add auc

parent 85f8dbb4
...@@ -65,9 +65,11 @@ def main(): ...@@ -65,9 +65,11 @@ def main():
train_spec = tf.estimator.TrainSpec(input_fn=lambda: esmm_input_fn(train_df, shuffle=True), max_steps=20000) train_spec = tf.estimator.TrainSpec(input_fn=lambda: esmm_input_fn(train_df, shuffle=True), max_steps=20000)
eval_spec = tf.estimator.EvalSpec(input_fn=lambda: esmm_input_fn(val_df, shuffle=False)) eval_spec = tf.estimator.EvalSpec(input_fn=lambda: esmm_input_fn(val_df, shuffle=False))
res = tf.estimator.train_and_evaluate(model, train_spec, eval_spec) res = tf.estimator.train_and_evaluate(model, train_spec, eval_spec)
print("@@@@@@@@@@") print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
print(res) print(res)
print("@@@@@@@@@@") print(res[0])
print(res[0]["ctr_auc"])
print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
model_export_path = str(Path("~/data/models/diary").expanduser()) model_export_path = str(Path("~/data/models/diary").expanduser())
save_path = model_export(model, all_features, model_export_path) save_path = model_export(model, all_features, model_export_path)
......
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