The Wayback Machine - https://web.archive.org/web/20190322174103/https://github.com/tensorlayer/tensorlayer
Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
Deep Learning and Reinforcement Learning Library for Developers and Scientists http://tensorlayer.readthedocs.io
Branch: master
Clone or download
zsdonghao Update README.md (#932)
TensorLayer 2.0 link
Latest commit aa9e52e Jan 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.github PyUP - Dependency Update Scheduled daily dependency update on wednesd… May 23, 2018
docker Transparent distributed model training through TensorLayer GPU Trainer ( Jul 24, 2018
docs Remove tl.layers.initialize_global_variables(sess) (#931) Jan 16, 2019
examples Remove tl.layers.initialize_global_variables(sess) (#931) Jan 16, 2019
img Delete img_qq.png (#893) Nov 21, 2018
requirements PyUP - Dependency Update Scheduled daily dependency update on friday (#… Dec 15, 2018
scripts Transparent distributed model training through TensorLayer GPU Trainer ( Jul 24, 2018
tensorlayer return false if load_and_assign fail to find a model (#919) Jan 2, 2019
tests YAPF Update (#896) Nov 25, 2018
.codacy.yaml Transparent distributed model training through TensorLayer GPU Trainer ( Jul 24, 2018
.dockerignore
.gitignore Release TL 1.10.1 (#825) Sep 7, 2018
.pyup.yml Contrib Loggers Module Added - Hyperdash (#739) Jul 22, 2018
.readthedocs.yml
.travis.yml PyUP - Dependency Update Scheduled daily dependency update on monday (#… Nov 6, 2018
CHANGELOG.md Remove tl.layers.initialize_global_variables(sess) (#931) Jan 16, 2019
CONTRIBUTING.md
LICENSE.rst update year to 2018 (#430) Mar 19, 2018
Makefile
README.md
README.rst update install instruction (dup of #858) (#859) Oct 13, 2018
setup.cfg Tl logging layer name fix (#683) Jun 6, 2018
setup.py remove graph api (#818) Sep 4, 2018
setup.travis.cfg
setup.travis_doc.cfg
tl

README.md

PyPI Stable Version PyPI RC Version Github commits (since latest release) PyPI - Python Version Supported TF Version Downloads

Build Status CircleCI Documentation Status Documentation Status PyUP Updates Docker Pulls Codacy Badge



TensorLayer is a novel TensorFlow-based deep learning and reinforcement learning library designed for researchers and engineers. It provides a large collection of customizable neural layers / functions that are key to build real-world AI applications. TensorLayer is awarded the 2017 Best Open Source Software by the ACM Multimedia Society.

🚀🚀🚀🚀 We are working hard on updating TensorLayer for TensorFlow 2.0 here, feel free to discuss and contribute!

Features

As deep learning practitioners, we have been looking for a library that can address various development purposes. This library is easy to adopt by providing diverse examples, tutorials and pre-trained models. Also, it allow users to easily fine-tune TensorFlow; while being suitable for production deployment. TensorLayer aims to satisfy all these purposes. It has three key features:

  • Simplicity : TensorLayer lifts the low-level dataflow interface of TensorFlow to high-level layers / models. It is very easy to learn through the rich example codes contributed by a wide community.

  • Flexibility : TensorLayer APIs are transparent: it does not mask TensorFlow from users; but leaving massive hooks that help low-level tuning and deep customization.

  • Zero-cost Abstraction : TensorLayer can achieve the full power of TensorFlow. The following table shows the training speeds of classic models using TensorLayer and native TensorFlow on a Titan X Pascal GPU.

    CIFAR-10 PTB LSTM Word2Vec
    TensorLayer 2528 images/s 18063 words/s 58167 words/s
    TensorFlow 2530 images/s 18075 words/s 58181 words/s

TensorLayer stands at a unique spot in the library landscape. Other wrapper libraries like Keras and TFLearn also provide high-level abstractions. They, however, often hide the underlying engine from users, which make them hard to customize and fine-tune. On the contrary, TensorLayer APIs are generally flexible and transparent. Users often find it easy to start with the examples and tutorials, and then dive into TensorFlow seamlessly. In addition, TensorLayer does not create library lock-in through native supports for importing components from Keras, TFSlim and TFLearn.

TensorLayer has a fast growing usage among top researchers and engineers, from universities like Imperial College London, UC Berkeley, Carnegie Mellon University, Stanford University, and University of Technology of Compiegne (UTC), and companies like Google, Microsoft, Alibaba, Tencent, Xiaomi, and Bloomberg.

Tutorials and Real-World Applications

You can find a large collection of tutorials, examples and real-world applications using TensorLayer through the following space:

Documentation

TensorLayer has extensive documentation for both beginners and professionals. The documentation is available in both English and Chinese. Please click the following icons to find the documents you need:

English Documentation Chinese Documentation Chinese Book

If you want to try the experimental features on the the master branch, you can find the latest document here.

Install

TensorLayer has pre-requisites including TensorFlow, numpy, and others. For GPU support, CUDA and cuDNN are required. The simplest way to install TensorLayer is to use the Python Package Index (PyPI):

# for last stable version
pip install --upgrade tensorlayer

# for latest release candidate
pip install --upgrade --pre tensorlayer

# if you want to install the additional dependencies, you can also run
pip install --upgrade tensorlayer[all]              # all additional dependencies
pip install --upgrade tensorlayer[extra]            # only the `extra` dependencies
pip install --upgrade tensorlayer[contrib_loggers]  # only the `contrib_loggers` dependencies

Alternatively, you can install the latest or development version by directly pulling from github:

pip install https://github.com/tensorlayer/tensorlayer/archive/master.zip
# or
# pip install https://github.com/tensorlayer/tensorlayer/archive/<branch-name>.zip

Using Docker

The TensorLayer containers are built on top of the official TensorFlow containers:

Containers with CPU support

# for CPU version and Python 2
docker pull tensorlayer/tensorlayer:latest
docker run -it --rm -p 8888:8888 -p 6006:6006 -e PASSWORD=JUPYTER_NB_PASSWORD tensorlayer/tensorlayer:latest

# for CPU version and Python 3
docker pull tensorlayer/tensorlayer:latest-py3
docker run -it --rm -p 8888:8888 -p 6006:6006 -e PASSWORD=JUPYTER_NB_PASSWORD tensorlayer/tensorlayer:latest-py3

Containers with GPU support

NVIDIA-Docker is required for these containers to work: Project Link

# for GPU version and Python 2
docker pull tensorlayer/tensorlayer:latest-gpu
nvidia-docker run -it --rm -p 8888:8888 -p 6006:6006 -e PASSWORD=JUPYTER_NB_PASSWORD tensorlayer/tensorlayer:latest-gpu

# for GPU version and Python 3
docker pull tensorlayer/tensorlayer:latest-gpu-py3
nvidia-docker run -it --rm -p 8888:8888 -p 6006:6006 -e PASSWORD=JUPYTER_NB_PASSWORD tensorlayer/tensorlayer:latest-gpu-py3

Contribute

Please read the Contributor Guideline before submitting your PRs.

Cite

If you find this project useful, we would be grateful if you cite the TensorLayer paper:

@article{tensorlayer2017,
    author  = {Dong, Hao and Supratak, Akara and Mai, Luo and Liu, Fangde and Oehmichen, Axel and Yu, Simiao and Guo, Yike},
    journal = {ACM Multimedia},
    title   = {{TensorLayer: A Versatile Library for Efficient Deep Learning Development}},
    url     = {http://tensorlayer.org},
    year    = {2017}
}

License

TensorLayer is released under the Apache 2.0 license.

You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.