V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
lufficc
V2EX  ›  Python

TensorFlow 的 TFRecord 和 QueueRunner 简介

  •  1
     
  •   lufficc ·
    lufficc · 2017-11-01 17:37:01 +08:00 · 2292 次点击
    这是一个创建于 2361 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如何将数据集转换为 TensorFlow 的 TFRecord 格式呢?为什么要转换为 TFRecord 格式?如何使用文件队列?如何生成 Batches ?

    TensorFlow 的 TFRecord 和 QueueRunner 简介

    6 条回复    2017-11-04 16:03:48 +08:00
    Boristype000
        1
    Boristype000  
       2017-11-01 22:26:33 +08:00
    原来那个 tf.contrib.data 在 1.4 并入 tf 变成 tf.data 的数据预处理模块楼主用过吗?好多地方都推荐用这个
    lufficc
        2
    lufficc  
    OP
       2017-11-01 23:12:34 +08:00
    inflationaaron
        3
    inflationaaron  
       2017-11-02 02:41:08 +08:00
    这种 feed data 的方法虽然性能最好,但是很不灵活,想要在 epoch 间切换到另一个 dataset 需要用 tf.where 之类的图内条件切换。这也是 TensorFlow 静态图的缺点之一。
    lufficc
        4
    lufficc  
    OP
       2017-11-02 10:09:40 +08:00
    @inflationaaron TensorFlow 动态图机制 Eager Execution,10.31 号出的,你怎么看?
    inflationaaron
        5
    inflationaaron  
       2017-11-03 22:31:08 +08:00
    @luffylcc 挺好的啊,给 TensorFlow 使用者提供了另一种选择。当然我觉得对于动态图有需求的早就转到 PyTorch 了。
    zsneoks
        6
    zsneoks  
       2017-11-04 16:03:48 +08:00
    我使用过,无非就是流化输入吧。有相应的 batch 接口啊,还可以 shuffle,可以参考源码里的 cifar10 的示例。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2794 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 05:56 · PVG 13:56 · LAX 22:56 · JFK 01:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.