Skip to content

A common viewer to inspect/dump any Tensor Flow TFRecord file into console.

Notifications You must be signed in to change notification settings

seeingrain/tfrecord_viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TFRecord Viewer

A common viewer to inspect/dump any Tensor Flow TFRecord file into console. This is a simple tool that provides you a good insight into the internal structure of *.tfrecord files.

Installation

If you want to run in a new anaconda env, run this:

conda create -n tfrecord_viewer python=3.10
conda activate tfrecord_viewer

Install tensorflow:

pip install tensorflow

Usage

In tfrecord_viewer.py, change TFRECORD_PATH to inspect any TFRecord file you want to view.

Then run python tfrecord_viewer.py, the TFRecord will be dumped in console.

Below are some example results:

TFRecord Console Output
test.tfrecord test
mnist.tfrecord mnist
nyu_rot.tfrecord nyu_rot

Feel free to modify the runtime parameters:

FIRST_N_RECORDS = 3
BYTES_LIST_PRINT_START_ELEMENTS = 2
BYTES_LIST_PRINT_TRAILING_ELEMENTS = 2
BYTES_LIST_MAX_BINARY_PRINT_LEN = 32
FLOAT_LIST_START_PRINT_LEN = 8
FLOAT_LIST_TRAILING_PRINT_LEN = 5
INT_LIST_START_PRINT_LEN = 8
INT_LIST_TRAILING_PRINT_LEN = 5

About

A common viewer to inspect/dump any Tensor Flow TFRecord file into console.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages