Commit 133d8c9c authored by 张彦钊's avatar 张彦钊

change test file

parent 7651d006
...@@ -149,7 +149,7 @@ if __name__ == '__main__': ...@@ -149,7 +149,7 @@ if __name__ == '__main__':
df.show(1) df.show(1)
print("aa") print("aa")
print("aa") print("aa")
df = spark.read.format("tfrecords").option("recordType", "SequenceExample").load("/strategy/esmm/va/part-r-00000") df = spark.read.format("tfrecords").load("/strategy/esmm/va/part-r-00000")
df.show(1) df.show(1)
......
...@@ -50,7 +50,8 @@ def input_fn(filenames, batch_size=32, num_epochs=1, perform_shuffle=False): ...@@ -50,7 +50,8 @@ def input_fn(filenames, batch_size=32, num_epochs=1, perform_shuffle=False):
"y": tf.FixedLenFeature([], tf.float32), "y": tf.FixedLenFeature([], tf.float32),
"z": tf.FixedLenFeature([], tf.float32), "z": tf.FixedLenFeature([], tf.float32),
"ids": tf.FixedLenFeature([FLAGS.field_size], tf.int64), "ids": tf.FixedLenFeature([FLAGS.field_size], tf.int64),
"level2_ids": tf.VarLenFeature(tf.int64) "level2_list": tf.VarLenFeature(tf.int64)
# "level2_ids": tf.VarLenFeature(tf.int64)
} }
parsed = tf.parse_single_example(record, features) parsed = tf.parse_single_example(record, features)
y = parsed.pop('y') y = parsed.pop('y')
...@@ -292,7 +293,9 @@ def main(_): ...@@ -292,7 +293,9 @@ def main(_):
#------init Envs------ #------init Envs------
path = "hdfs:///strategy/esmm/" path = "hdfs:///strategy/esmm/"
tr_files = [path+"tr/part-r-00000"]
tr_files = ["hdfs:///strategy/va.tfrecord"]
# tr_files = [path+"tr/part-r-00000"]
va_files = [path+"va/part-r-00000"] va_files = [path+"va/part-r-00000"]
te_files = ["%s/part-r-00000" % FLAGS.hdfs_dir] te_files = ["%s/part-r-00000" % FLAGS.hdfs_dir]
......
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