读取tfreocrd的内容和键值。在tf2里没有找到合适的原生函数,还是调用的v1的包
for example in tf.compat.v1.python_io.tf_record_iterator("data/foobar.tfrecord"):
print(tf.train.Example.FromString(example))
keys = list(example.features.feature.keys())
print(keys())
标签:tfrecord,v1,keys,print,操作,tf,相关,example
From: https://www.cnblogs.com/geoli/p/17236041.html