Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tensorflow as tf
- from google.protobuf.json_format import MessageToJson
- filename = 'myfile.tfrecords'
- for record_str in tf.python_io.tf_record_iterator(filename):
- example = tf.train.Example.FromString(record_str)
- json = MessageToJson(example)
- print(json)
- uin = input('Press Enter to contiue to next example [q to quit]: ').strip()
- if uin.lower() == 'q':
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement