Commit 8972fb36 authored by Your Name's avatar Your Name

bug fix

parent 5c4d9390
...@@ -161,14 +161,14 @@ def main(): ...@@ -161,14 +161,14 @@ def main():
preds = Estimator.predict(input_fn=lambda: input_fn(te_files, num_epochs=1, batch_size=10000), predict_keys=["pctcvr","pctr","pcvr"]) preds = Estimator.predict(input_fn=lambda: input_fn(te_files, num_epochs=1, batch_size=10000), predict_keys=["pctcvr","pctr","pcvr"])
# with open("/home/gmuser/esmm/nearby/pred.txt", "w") as fo: with open("/home/gmuser/esmm/nearby/pred.txt", "w") as fo:
# for prob in preds: for prob in preds:
# fo.write("%f\t%f\t%f\n" % (prob['pctr'], prob['pcvr'], prob['pctcvr'])) fo.write("%f\t%f\t%f\n" % (prob['pctr'], prob['pcvr'], prob['pctcvr']))
indices = [] # indices = []
for prob in preds: # for prob in preds:
indices.append([prob['pctr'], prob['pcvr'], prob['pctcvr']]) # indices.append([prob['pctr'], prob['pcvr'], prob['pctcvr']])
return indices # return indices
def test_map(x): def test_map(x):
return x * x return x * x
......
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