Commit 1e387cb4 authored by 宋柯's avatar 宋柯

模型调试

parent 432e25bd
...@@ -940,8 +940,8 @@ if __name__ == '__main__': ...@@ -940,8 +940,8 @@ if __name__ == '__main__':
# train_samples.write.mode("overwrite").options(header="false", sep='|').csv(output_file) # train_samples.write.mode("overwrite").options(header="false", sep='|').csv(output_file)
import tensorflow as tf import tensorflow as tf
def get_example_string(line): def get_example_string(row):
splits = line.split('|') splits = row[0].split('|')
features = { features = {
'ITEM_CATEGORY_card_id': tf.train.Feature(bytes_list=tf.train.BytesList(value=[splits[0].encode()])), 'ITEM_CATEGORY_card_id': tf.train.Feature(bytes_list=tf.train.BytesList(value=[splits[0].encode()])),
'USER_CATEGORY_device_id': tf.train.Feature(bytes_list=tf.train.BytesList(value=[splits[2].encode()])), 'USER_CATEGORY_device_id': tf.train.Feature(bytes_list=tf.train.BytesList(value=[splits[2].encode()])),
......
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