Commit b03aac6c authored by Your Name's avatar Your Name

change predict and sort process

parent dc7f3d96
......@@ -59,14 +59,10 @@ def input_fn(filenames, batch_size=32, num_epochs=1, perform_shuffle=False):
"tag6_list": tf.VarLenFeature(tf.int64),
"tag7_list": tf.VarLenFeature(tf.int64),
"search_tag2_list": tf.VarLenFeature(tf.int64),
<<<<<<< HEAD
"search_tag3_list": tf.VarLenFeature(tf.int64),
"uid": tf.VarLenFeature(tf.string),
"city": tf.VarLenFeature(tf.string),
"cid_id": tf.VarLenFeature(tf.string)
=======
"search_tag3_list": tf.VarLenFeature(tf.int64)
>>>>>>> 6219b3d856f8bfae4b542ea25d6ffb4209e193ad
}
parsed = tf.parse_single_example(record, features)
y = parsed.pop('y')
......@@ -135,13 +131,10 @@ def model_fn(features, labels, mode, params):
tag7_list = features['tag7_list']
search_tag2_list = features['search_tag2_list']
search_tag3_list = features['search_tag3_list']
<<<<<<< HEAD
uid = features['uid']
city = features['city']
cid_id = features['cid_id']
=======
>>>>>>> 6219b3d856f8bfae4b542ea25d6ffb4209e193ad
if FLAGS.task_type != "infer":
y = labels['y']
......@@ -167,13 +160,10 @@ def model_fn(features, labels, mode, params):
# x_concat = tf.reshape(embedding_id,shape=[-1, common_dims]) # None * (F * K)
x_concat = tf.concat([tf.reshape(embedding_id, shape=[-1, common_dims]), app_id, level2, level3, tag1,
tag2, tag3, tag4, tag5, tag6, tag7,search_tag2,search_tag3], axis=1)
<<<<<<< HEAD
uid = tf.sparse.to_dense(uid,default_value="")
city = tf.sparse.to_dense(city,default_value="")
cid_id = tf.sparse.to_dense(cid_id,default_value="")
=======
>>>>>>> 6219b3d856f8bfae4b542ea25d6ffb4209e193ad
with tf.name_scope("CVR_Task"):
if mode == tf.estimator.ModeKeys.TRAIN:
......
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