Examples¶
We list some examples here, but more tutorials and applications can be found in Github examples.
Commonly used dataset and pretrained models¶
Basics¶
Multi-layer perceptron (MNIST), simple usage and supports multiple backends. Classification task, see mnist_mlp.py.
Generative Adversarial Networks (MNIST), simple usage and supports multiple backends. See mnist_gan.py.
Convolutional Network (CIFAR-10), simple usage and supports multiple backends. Classification task, see cifar10_cnn.py.
Recurrent Neural Network (IMDB), simple usage and supports multiple backends. Text classification task, see imdb_LSTM_simple.py.
Using tensorlayerx to automatic inference input shape. See automatic_inference_input _shape.py.
Using ModuleList in tensorlayerx. See tutorial_ModuleList.py.
Using Sequential in tensorlayerx. See mnist_Sequential.py.
Using Dataflow in tensorlayerx. See mnist_dataflow.py.
Using nested layer in tensorlayerx. See nested_usage_of_layer.py.
Using tensorlayerx to save tensorflow model to pb. See tensorflow_model_save_to_pb.py.
Using tensorlayerx to load model from npz. See tutorial_tensorlayer_model_load.py.
Pretrained Models¶
VGG 16 (ImageNet). Classification task demo, see pretrained_vgg16. and VGG model, see vgg.py.
Resnet50 (ImageNet). Classification task demo, see pretrained_resnet50.py. and Resnet model, see resnet.py.
YOLOv4 (MS-COCO). Object Detection demo, see pretrained_yolov4.py. and YOLOv4 model, see yolo.py.
All pretrained models in pretrained-models.
Vision¶
- Warning:These examples below only support Tensorlayer 2.0. TensorlayerX is under development.
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¶
- Warning:These examples below only support Tensorlayer 2.0. TensorlayerX is under development.
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¶
- Warning:These examples below only support Tensorlayer 2.0. TensorlayerX is under development.
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¶
- Warning:These examples below only support Tensorlayer 2.0. TensorlayerX is under development.
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.
Miscellaneous¶
Warning:These examples below only support Tensorlayer 2.0. TensorlayerX is under development.
Sipeed : Run TensorLayer on AI Chips