Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Reinforcement Learning and Deep Learning Library for Researcher and Engineer.

Project description

TENSORLAYER-LOGO

Awesome Documentation-EN Documentation-CN Book-CN Downloads

PyPI PyPI-Prerelease Commits-Since Python TensorFlow

Travis Docker RTD-EN RTD-CN PyUP Docker-Pulls Code-Quality

JOIN-SLACK-LOGO

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.

Why another deep learning library: TensorLayer

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.

Install

TensorLayer has pre-requisites including TensorFlow, numpy, matplotlib and nltk (optional). 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 tensorlayer

# for latest release candidate
pip install --pre tensorlayer

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

pip install git+https://github.com/tensorlayer/tensorlayer.git

Using Docker - a ready-to-use environment

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:88888 -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.

Project details


Release history Release notifications

This version
History Node

1.9.0

History Node

1.8.6rc6

History Node

1.8.6rc5

History Node

1.8.6rc4

History Node

1.8.6rc3

History Node

1.8.6rc2

History Node

1.8.6rc1

History Node

1.8.6rc0

History Node

1.8.5

History Node

1.8.5rc2

History Node

1.8.5rc1

History Node

1.8.4

History Node

1.8.4rc1

History Node

1.8.4rc0

History Node

1.8.3

History Node

1.8.3rc0

History Node

1.8.2

History Node

1.8.1

History Node

1.8.0

History Node

1.8.0rc0

History Node

1.7.4

History Node

1.7.3

History Node

1.7.2

History Node

1.7.2rc

History Node

1.7.1

History Node

1.7.0

History Node

1.6.7

History Node

1.6.6

History Node

1.6.5

History Node

1.6.4

History Node

1.6.3

History Node

1.6.2

History Node

1.6.1

History Node

1.6.0

History Node

1.5.4

History Node

1.5.3

History Node

1.5.2

History Node

1.5.1

History Node

1.5.0

History Node

1.4.5

History Node

1.4.4

History Node

1.4.3

History Node

1.4.2

History Node

1.4.1

History Node

1.3.11

History Node

1.3.10

History Node

1.3.9

History Node

1.3.8

History Node

1.3.7

History Node

1.3.6

History Node

1.3.5

History Node

1.3.4

History Node

1.3.3

History Node

1.3.2

History Node

1.3.1

History Node

1.3.0

History Node

1.2.8

History Node

1.2.7

History Node

1.2.6

History Node

1.2.5

History Node

1.2.4

History Node

1.2.2

History Node

1.2.1

History Node

1.2

History Node

1.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
tensorlayer-1.9.0-py2.py3-none-any.whl (245.1 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Jun 16, 2018
tensorlayer-1.9.0-py3-none-any.whl (245.1 kB) Copy SHA256 hash SHA256 Wheel py3 Jun 16, 2018
tensorlayer-1.9.0.tar.gz (181.2 kB) Copy SHA256 hash SHA256 Source None Jun 16, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page