我正在尝试使用 Dataset API 设计输入管道。我正在处理镶木地板文件。将它们添加到我的管道中的好方法是什么?
我们已经发布了万能风暴 https://github.com/uber/petastorm,一个开源库,允许您通过 Tensorflow Dataset API 直接使用 Apache Parquet 文件。
这里有一个小example https://github.com/uber/petastorm/blob/master/examples/hello_world/tensorflow_hello_world.py:
with Reader('hdfs://.../some/hdfs/path') as reader:
dataset = make_petastorm_dataset(reader)
iterator = dataset.make_one_shot_iterator()
tensor = iterator.get_next()
with tf.Session() as sess:
sample = sess.run(tensor)
print(sample.id)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)