Skip to content

Instantly share code, notes, and snippets.

@LeegleechN
LeegleechN / verify_tfrecords.py
Last active September 14, 2020 15:56
Check TFRecords
"""Checks if a set of TFRecords appear to be valid.
Specifically, this checks whether the provided record sizes are consistent and
that the file does not end in the middle of a record. It does not verify the
CRCs.
"""
import struct
import tensorflow as tf
from tensorflow import app