Tensorpack是一个基于TensorFlow的神经网络训练界面。
https://github.com/tensorpack/tensorpack
特征:
它是另一个TF高级API,具有速度,可读性和灵活性。
-
专注于培训速度。
-
Tensorpack免费提供速度 - 它以高效的方式使用TensorFlow ,无需额外开销。在常见的CNN上,它比同等的Keras代码运行速度快1.2~5倍。如果用Tensorpack书写,你的训练可能会更快。
-
数据并行多GPU /分布式培训策略现成可供使用。它的扩展性与谷歌的官方基准一样。
-
有关一些基准脚本,请参阅tensorpack / benchmarkmark。
-
-
专注于大型数据集。
- 你通常不需要
tf.data
。符号编程通常会使数据处理更加困难。Tensorpack可帮助您使用自动并行化在纯Python中高效处理大型数据集(例如ImageNet)。
- 你通常不需要
-
它不是模型包装器。
- 世界上有太多的符号功能包装器。Tensorpack仅包含一些常见模型。但你可以在Tensorpack中使用任何符号函数库,包括tf.layers / Keras / slim / tflearn / tensorlayer / ....
请参阅教程以了解有关这些功能的更多信息。
示例:
Tensorpack Examples
Training examples with reproducible performance.
The word "reproduce" should always mean reproduce performance. With the magic of SGD, wrong deep learning code often appears to work, especially if you try it on toy datasets. Github is full of such deep learning code that "implements" but does not "reproduce" methods. See Unawareness of Deep Learning Mistakes.
We refuse toy examples. Instead of showing you 10 arbitrary networks trained on toy datasets with random final performance, tensorpack examples try to faithfully replicate experiments and performance in the paper, so you're confident that they are correct.
Getting Started:
These are all the toy examples in tensorpack. They are supposed to be just demos.
- An illustrative MNIST example with explanation of the framework
- Tensorpack supports any symbolic libraries. See the same MNIST example written with tf.layers, tf-slim, and with weights visualizations
- A tiny Cifar ConvNet and SVHN ConvNet
- If you've used Keras, check out Keras+Tensorpack examples
- A boilerplate file to start with, for your own tasks
Vision:
Name | Performance |
---|---|
Train ResNet, ShuffleNet and other models on ImageNet | reproduce paper |
Train Faster-RCNN / Mask-RCNN on COCO | reproduce paper |
Generative Adversarial Network(GAN) variants, including DCGAN, InfoGAN, Conditional GAN, WGAN, BEGAN, DiscoGAN, Image to Image, CycleGAN |
visually reproduce |
DoReFa-Net: training binary / low-bitwidth CNN on ImageNet | reproduce paper |
Fully-convolutional Network for Holistically-Nested Edge Detection(HED) | visually reproduce |
Spatial Transformer Networks on MNIST addition | reproduce paper |
Visualize CNN saliency maps | visually reproduce |
Similarity learning on MNIST | |
Single-image super-resolution using EnhanceNet | |
Learn steering filters with Dynamic Filter Networks | visually reproduce |
Load a pre-trained AlexNet, VGG, or Convolutional Pose Machines | |
Load a pre-trained FlowNet2-S, FlowNet2-C, FlowNet2 |
Reinforcement Learning:
Name | Performance |
---|---|
Deep Q-Network(DQN) variants on Atari games, including DQN, DoubleDQN, DuelingDQN. |
reproduce paper |
Asynchronous Advantage Actor-Critic(A3C) on Atari games | reproduce paper |
Speech / NLP:
Name | Performance |
---|---|
LSTM-CTC for speech recognition | reproduce paper |
char-rnn for fun | fun |
LSTM language model on PennTreebank |
我们拒绝玩具的例子。Tensorpack实例不是向您展示10个在玩具数据集上训练的任意网络, 而是忠实地复制论文并关注复制数字,展示其实际研究的灵活性。
Vision:
- 在ImageNet上训练ResNet和其他模型。
- 在COCO对象检测上训练更快 - RCNN / Mask-RCNN
- 生成性对抗网络(GAN)变体,包括DCGAN,InfoGAN,条件GAN,WGAN,BEGAN,DiscoGAN,图像到图像,CycleGAN。
- DoReFa-Net:在ImageNet上训练二进制/低位宽CNN
- 用于整体嵌套边缘检测(HED)的全卷积网络
- MNIST上的空间变压器网络
- 可视化CNN显着性图
- 关于MNIST的相似性学习
强化学习:
- Atari游戏的深度Q-Network(DQN)变体,包括DQN,DoubleDQN,DuelingDQN。
- Asynchronous Advantage Actor-Critic(A3C)在OpenAI Gym上进行了演示
演讲/ NLP:
安装:
依赖关系:
- Python 2.7或3.3+。
- OpenCV的Python绑定(可选,但许多功能都需要)
- TensorFlow> = 1.3。(如果您只想
tensorpack.dataflow
单独用作数据处理库,则不需要TensorFlow)
pip install --upgrade git+https://github.com/tensorpack/tensorpack.git
# or add `--user` to avoid system-wide installation.
https://github.com/tensorpack/