一般需要用来统计样本数量的:
# 该函数用于统计 TFRecord 文件中的样本数量(总数)
def total_sample(file_name):
sample_nums = 0
for record in tf.python_io.tf_record_iterator(file_name):
sample_nums += 1
return sample_nums
博客提及一般用于统计样本数量的相关内容,并给出参考链接http://www.voidcn.com/article/p-blhqycua-brs.html 。
一般需要用来统计样本数量的:
# 该函数用于统计 TFRecord 文件中的样本数量(总数)
def total_sample(file_name):
sample_nums = 0
for record in tf.python_io.tf_record_iterator(file_name):
sample_nums += 1
return sample_nums

被折叠的 条评论
为什么被折叠?