An open API service indexing awesome lists of open source software.

https://github.com/joelypoley/tensorshow

A python module for inspecting TFRecords.
https://github.com/joelypoley/tensorshow

inspector jupyter-notebook tensorflow tfrecord visualizer

Last synced: about 2 months ago
JSON representation

A python module for inspecting TFRecords.

Awesome Lists containing this project

README

        

# Tensorshow

Tensorshow is a python module for inspecting [TFRecords](https://www.tensorflow.org/api_guides/python/reading_data#file_formats).

## Installation

Requires python 3.6.

```bash
pip install tensorshow
```

## Examples

Tensorshow can convert a TFRecord to a pandas dataframe.

```python
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.

```python
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.

![TFRecord displayed as a table](http://www.joellaity.com/img/html_tensorshow_example.png)

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.

![A preview of a TFRecord in a jupyter notebook](http://www.joellaity.com/img/nb_tensorshow_example.png)