Created
April 11, 2019 17:42
-
-
Save rreece/beb3be0605ef0d8a6ee8050b5cdb0179 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment