Tensorshow is a python module for inspecting TFRecords.
Requires python 3.6.
pip install tensorshow
Tensorshow can convert a TFRecord to a pandas dataframe.
import tensorshow
# The column labels of `df` are the features of the tf.train.example protobufs.
df = tensorshow.dataframe_from('path/to/tfrecord', limit=100)
Tensorshow can convert a tfrecord to an html file.
import tensorshow
# The column labels of `df` are the features of the tf.train.example protobufs.
df = tensorshow.html_file_from('path/to/tfrecord', 'path/to/html/outfile', limit=100)
The resulting html file will look like this. Tensorshow automatically detects if a byte string is an encoded image and displays it appropriately.
Tensorshow can be used in a jupyter notebook to preview a TFRecord. The head
function will show the first five tf.train.example
s by default and the sample
function will show five random tf.train.example
s from the tfrecord.