PAIR-code / what-if-tool

Source code/webpage/demos for the What-If Tool
https://pair-code.github.io/what-if-tool
Apache License 2.0
907 stars 169 forks source link

How to generator my tfRecord file, I have generator my own TFRecord file, it's work ok on my local, but not work ok on what if tool #195

Open johnsGuo opened 2 years ago

johnsGuo commented 2 years ago

example = tf.train.Example(features=tf.train.Features(feature={ 'dense_input': tf.train.Feature(float_list=tf.train.FloatList(value=dense)), 'sparse_ids_input': tf.train.Feature(int64_list=tf.train.Int64List(value=feat_ids)), 'sparse_wgt_input': tf.train.Feature(float_list=tf.train.FloatList(value=feat_vals)), 'seq_50_input': tf.train.Feature(int64_list=tf.train.Int64List(value=seq_50)), 'is_click': tf.train.Feature(int64_list=tf.train.Int64List(value=[int(labels)])), }))

writer.write(example.SerializeToString())

jameswex commented 2 years ago

What error do you see when trying to load this TFRecord file into the What-If Tool? If running through TensorBoard, you may see errors in the running log on the console that launched the TensorBoard job.