Examples¶
We list some examples here, but more tutorials and applications can be found in Github examples and Awesome-TensorLayer.
Basics¶
Multi-layer perceptron (MNIST), simple usage. Classification task, see tutorial_mnist_simple.py.
Multi-layer perceptron (MNIST), dynamic model. Classification with dropout using iterator, see tutorial_mnist_mlp_dynamic.py method2.
Multi-layer perceptron (MNIST), static model. Classification with dropout using iterator, see tutorial_mnist_mlp_static.py.
Convolutional Network (CIFAR-10). Classification task, see tutorial_cifar10_cnn_static.py.
TensorFlow dataset API for object detection see here.
Data augmentation with TFRecord. Effective way to load and pre-process data, see tutorial_tfrecord*.py and tutorial_cifar10_tfrecord.py.
Data augmentation with TensorLayer. See tutorial_fast_affine_transform.py (for quick test only).
Pretrained Models¶
VGG 16 (ImageNet). Classification task, see tutorial_models_vgg16.
VGG 19 (ImageNet). Classification task, see tutorial_models_vgg19.py.
SqueezeNet (ImageNet). Model compression, see tutorial_models_squeezenetv1.py.
MobileNet (ImageNet). Model compression, see tutorial_models_mobilenetv1.py.
All pretrained models in pretrained-models.
Vision¶
Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization, see examples.
ArcFace: Additive Angular Margin Loss for Deep Face Recognition, see InsignFace.
Ternary Weight Network. Model compression, see mnist cifar10.
Wide ResNet (CIFAR) by ritchieng.
Variational Autoencoder (VAE) for (CelebA) by yzwxx.
Variational Autoencoder (VAE) for (MNIST) by BUPTLdy.
Image Captioning - Reimplementation of Google’s im2txt by zsdonghao.
Adversarial Learning¶
DCGAN (CelebA). Generating images by Deep Convolutional Generative Adversarial Networks by zsdonghao.
Generative Adversarial Text to Image Synthesis by zsdonghao.
Unsupervised Image to Image Translation with Generative Adversarial Networks by zsdonghao.
Improved CycleGAN with resize-convolution by luoxier.
BEGAN: Boundary Equilibrium Generative Adversarial Networks by 2wins.
DAGAN: Fast Compressed Sensing MRI Reconstruction by nebulaV.
Natural Language Processing¶
Recurrent Neural Network (LSTM). Apply multiple LSTM to PTB dataset for language modeling, see tutorial_ptb_lstm_state_is_tuple.py.
Word Embedding (Word2vec). Train a word embedding matrix, see tutorial_word2vec_basic.py.
Restore Embedding matrix. Restore a pre-train embedding matrix, see tutorial_generate_text.py.
Text Generation. Generates new text scripts, using LSTM network, see tutorial_generate_text.py.
Chinese Text Anti-Spam by pakrchen.
FastText Sentence Classification (IMDB), see tutorial_imdb_fasttext.py by tomtung.
Reinforcement Learning¶
Policy Gradient / Network (Atari Ping Pong), see tutorial_atari_pong.py.
Deep Q-Network (Frozen lake), see tutorial_frozenlake_dqn.py.
Q-Table learning algorithm (Frozen lake), see tutorial_frozenlake_q_table.py.
Asynchronous Policy Gradient using TensorDB (Atari Ping Pong) by nebulaV.
AC for discrete action space (Cartpole), see tutorial_cartpole_ac.py.
A3C for continuous action space (Bipedal Walker), see tutorial_bipedalwalker_a3c*.py.