.. _example: ============ Examples ============ We list some examples here, but more tutorials and applications can be found in `Github examples `__ and `Awesome-TensorLayer `_. Commonly used dataset and pretrained models =========================================== - MNIST, see `MNIST `__. - CIFAR10, see `CIFAR10 `__. - YOLOv4 Pretrained Model, see `YOLOv4 `__. password: idsz - VGG16 Pretrained Model, see `VGG16 `__. password: t36u - VGG19 Pretrained Model, see `VGG19 `__. password: rb8w - ResNet50 Pretrained Model, see `ResNet50 `__. password: 3nui Basics ============ - Multi-layer perceptron (MNIST), simple usage and supports multiple backends. Classification task, see `tutorial_mnist_simple.py `__. - Multi-layer perceptron (MNIST), mix of tensorlayer and tensorflow. Classification with dropout using iterator, see `tutorial_mnist_mlp_tensorflow_backend.py `__. - Multi-layer perceptron (MNIST), mix of tensorlayer and mindspore. Classification task, see `tutorial_mnist_mlp_mindspore_backend.py `__. - Multi-layer perceptron (MNIST), mix of tensorlayer and paddlepaddle. Classification task, see `tutorial_mnist_mlp_paddlepaddle_backend.py `__. - Convolutional Network (CIFAR-10). mix of tensorlayer and tensorflow. Classification task, see `tutorial_cifar10_cnn_tensorflow_backend.py `_. - Convolutional Network (CIFAR-10). mix of tensorlayer and mindspore. Classification task, see `tutorial_cifar10_cnn_mindspore_backend.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 `pretrained_vgg16 `__. - VGG 19 (ImageNet). Classification task, see `tutorial_models_vgg19.py `__. - YOLOv4 (MS-COCO). Object Detection, see `pretrained_yolov4.py `__. - SqueezeNet (ImageNet, Based on TensroLayer2.0). Model compression, see `tutorial_models_squeezenetv1.py `__. - MobileNet (ImageNet, Based on TensroLayer2.0). Model compression, see `tutorial_models_mobilenetv1.py `__. - All pretrained models in `pretrained-models `__. Vision ================== Warning:These examples below only support Tensorlayer 2.0. Tensorlayer 3.0 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 `__. - BinaryNet. Model compression, see `mnist `__ `cifar10 `__. - Ternary Weight Network. Model compression, see `mnist `__ `cifar10 `__. - DoReFa-Net. Model compression, see `mnist `__ `cifar10 `__. - QuanCNN. Model compression, sees `mnist `__ `cifar10 `__. - Wide ResNet (CIFAR) by `ritchieng `__. - `Spatial Transformer Networks `__ by `zsdonghao `__. - `U-Net for brain tumor segmentation `__ by `zsdonghao `__. - 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. Tensorlayer 3.0 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 `__. - `Super Resolution GAN `__ by `zsdonghao `__. - `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. Tensorlayer 3.0 is under development. - 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 `__. - `Chatbot in 200 lines of code `__ for `Seq2Seq `__. - FastText Sentence Classification (IMDB), see `tutorial_imdb_fasttext.py `__ by `tomtung `__. Reinforcement Learning ============================== Warning:These examples below only support Tensorlayer 2.0. Tensorlayer 3.0 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 `__. - `DAGGER `__ for (`Gym Torcs `__) by `zsdonghao `__. - `TRPO `__ for continuous and discrete action space by `jjkke88 `__. Miscellaneous ================= Warning:These examples below only support Tensorlayer 2.0. Tensorlayer 3.0 is under development. - `Sipeed `__ : Run TensorLayer on AI Chips .. - TensorDB by `fangde `__ see `tl_paper `__. - A simple web service - `TensorFlask `__ by `JoelKronander `__. .. Applications ============= There are some good applications implemented by TensorLayer. You may able to find some useful examples for your project. If you want to share your application, please contact tensorlayer@gmail.com. 1D CNN + LSTM for Biosignal --------------------------------- Author : `Akara Supratak `__ Introduction ^^^^^^^^^^^^ Implementation ^^^^^^^^^^^^^^ Citation ^^^^^^^^ .. _GitHub: https://github.com/tensorlayer/tensorlayer .. _Deeplearning Tutorial: http://deeplearning.stanford.edu/tutorial/ .. _Convolutional Neural Networks for Visual Recognition: http://cs231n.github.io/ .. _Neural Networks and Deep Learning: http://neuralnetworksanddeeplearning.com/ .. _TensorFlow tutorial: https://www.tensorflow.org/versions/r0.9/tutorials/index.html .. _Understand Deep Reinforcement Learning: http://karpathy.github.io/2016/05/31/rl/ .. _Understand Recurrent Neural Network: http://karpathy.github.io/2015/05/21/rnn-effectiveness/ .. _Understand LSTM Network: http://colah.github.io/posts/2015-08-Understanding-LSTMs/ .. _Word Representations: http://colah.github.io/posts/2014-07-NLP-RNNs-Representations/