TensorFlow: Check the Number of Files in TFrecords
作者:XD / 发表: 2020年9月6日 23:54 / 更新: 2020年9月8日 04:14 / 编程笔记 / 阅读量:1976
After packaging a tfrecord file, we need to check whether all the files are in the tfrecord file or not. Here is the code.
import tensorflow as tf
name = '.../test.tfrecords'
count = 0
for record in tf.python_io.tf_record_iterator(name):
count += 1
print(c)
相关标签