tensorpack

tensorpack

Neural Network Toolbox on TensorFlow.

See some examples to learn about the framework:

Vision:

  • DoReFa-Net: train binary / low-bitwidth CNN on ImageNet
  • Train ResNet on ImageNet / Cifar10 / SVHN
  • Generative Adversarial Network(GAN) variants, including DCGAN, InfoGAN, Conditional GAN, WGAN, BEGAN, DiscoGAN, Image to Image, CycleGAN.
  • Fully-convolutional Network for Holistically-Nested Edge Detection(HED)
  • Spatial Transformer Networks on MNIST addition
  • Visualize CNN saliency maps
  • Similarity learning on MNIST

Reinforcement Learning:

  • Deep Q-Network(DQN) variants on Atari games, including DQN, DoubleDQN, DuelingDQN.
  • Asynchronous Advantage Actor-Critic(A3C) with demos on OpenAI Gym

Speech / NLP:

  • LSTM-CTC for speech recognition
  • char-rnn for fun
  • LSTM language model on PennTreebank

The examples are not only for demonstration of the framework -- you can train them and reproduce the results in papers.

Features:

It's Yet Another TF wrapper, but different in:

  1. Not focus on models.
    • There are already too many symbolic function wrappers. Tensorpack includes only a few common models, and helpful tools such as LinearWrap to simplify large models. But you can use any other wrappers within tensorpack, such as sonnet/Keras/slim/tflearn/tensorlayer/....
  2. Focus on training speed.
    • Tensorpack trainer is almost always faster than feed_dict based wrappers. Even on a tiny CNN example, the training runs 2x faster than the equivalent Keras code.
    • Data-parallel multi-GPU training is off-the-shelf to use. It is as fast as Google's benchmark code.
    • Data-parallel distributed training is off-the-shelf to use. It is as slow as Google's benchmark code.
  3. Focus on large datasets.
    • It's painful to read/preprocess data from TF. Use DataFlow to load large datasets (e.g. ImageNet) in pure Python with multi-process prefetch.
    • DataFlow has a unified interface, so you can compose and reuse them to perform complex preprocessing.
  4. Interface of extensible Callbacks. Write a callback to implement everything you want to do apart from the training iterations, and enable it with one line of code. Common examples include:
    • Change hyperparameters during training
    • Print some tensors of interest
    • Run inference on a test dataset
    • Run some operations once a while
    • Send loss to your phone

Install:

Dependencies:

  • Python 2 or 3
  • TensorFlow >= 1.0.0 (>=1.1.0 for Multi-GPU)
  • Python bindings for OpenCV (Optional, but required by a lot of features)
pip install -U git+https://github.com/ppwwyyxx/tensorpack.git
# or add `--user` to avoid system-wide installation.

本文分享自微信公众号 - CreateAMind(createamind)

原文出处及转载信息见文内详细说明,如有侵权,请联系 yunjia_community@tencent.com 删除。

原始发表时间:2017-07-17

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • Efficient Deep Learning for Stereo Matching:代码

    在今年6月于美国拉斯维加斯召开的CVRP大会上,多伦多大学的Raquel Urtasun教授和她的学生改进了深度学习中的Siamese网络,用一个内积层代替了拼...

    用户1908973
  • 99行深度学习代码训练自动驾驶游戏

    deep learning in 2017 is magical. We get to apply immensely complex algorithms t...

    用户1908973
  • End-to-end Driving via Conditional Imitation Learning

    Felipe Codevilla, Matthias Müller, Alexey Dosovitskiy, Antonio López, Vladlen Ko...

    用户1908973
  • Efficient Deep Learning for Stereo Matching:代码

    在今年6月于美国拉斯维加斯召开的CVRP大会上,多伦多大学的Raquel Urtasun教授和她的学生改进了深度学习中的Siamese网络,用一个内积层代替了拼...

    用户1908973
  • 探索由电池供电的移动设备上深度卷积神经网络的训练:设计与应用(CS LG)

    移动设备上快速发展的智能应用利用预训练的深度学习模型进行推理。然而,这些模型通常不会在此后进行更新。这给适应新的数据分布留下了很大的差距。在本文中,我们进一步将...

    刘持诚
  • 使用JavaScript Function.prototype进行代码重构的一些例子

    Suppose there is already a big function with huge logic, and you have the task t...

    Jerry Wang
  • 【Rust日报】 2019-10-25 例子學習:基於Autoref的穩定特化

    然後再將其上傳到數據庫,並且要在/opt/docs-rs-prefix/documentations目錄中進行。

    MikeLoveRust
  • 前端工程化那些事

    创建模式有两种,一种是默认配置(没有带其他辅助功能的 npm包),另一种是手动配置(可按照生产需要进行配置)

    树酱
  • 图像检索中的DELF模型(DEep Local Features)实践

      近日,抽空跑通了delf模型,它已经成为tensorflow models中research的一个子工程(见网址:https://github.com/te...

    sparkexpert
  • AC算法在美团上单系统的应用

    在美团,为了保证单子质量,需要对上单系统创建的每一个产品进行审核。为了提高效率,审核人员积累提炼出了一套关键词库,先基于该词库进行自动审核过滤,对于不包括这些关...

    Java架构师必看

扫码关注云+社区

领取腾讯云代金券