Skip to main content

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.

Design Features

TensorLayer is a new deep learning library designed with simplicity, flexibility and high-performance in mind.

  • Simplicity : TensorLayer has a high-level layer/model abstraction which is effortless to learn. You can learn how deep learning can benefit your AI tasks in minutes through the massive [examples](https://github.com/tensorlayer/awesome-tensorlayer).

  • Flexibility : TensorLayer APIs are transparent and flexible, inspired by the emerging PyTorch library. Compared to the Keras abstraction, TensorLayer makes it much easier to build and train complex AI models.

  • Zero-cost Abstraction : Though simple to use, TensorLayer does not require you to make any compromise in the performance of TensorFlow (Check the following benchmark section for more details).

TensorLayer stands at a unique spot in the TensorFlow wrappers. Other wrappers like Keras and TFLearn hide many powerful features of TensorFlow and provide little support for writing custom AI models. Inspired by PyTorch, TensorLayer APIs are simple, flexible and Pythonic, making it easy to learn while being flexible enough to cope with complex AI tasks. TensorLayer has a fast-growing community. It has been used by researchers and engineers all over the world, including those from Peking University, Imperial College London, UC Berkeley, Carnegie Mellon University, Stanford University, and companies like Google, Microsoft, Alibaba, Tencent, Xiaomi, and Bloomberg.

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 - 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 papers.

@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}
}

@inproceedings{tensorlayer2021,
  title={Tensorlayer 3.0: A Deep Learning Library Compatible With Multiple Backends},
  author={Lai, Cheng and Han, Jiarong and Dong, Hao},
  booktitle={2021 IEEE International Conference on Multimedia \& Expo Workshops (ICMEW)},
  pages={1--3},
  year={2021},
  organization={IEEE}

License

TensorLayer is released under the Apache 2.0 license.

Metadata

Release files for tensorlayer 2.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tensorlayer 2.2.5
File Size Uploaded
tensorlayer-2.2.5.tar.gz 277.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tensorlayer 2.2.5
File Interpreter ABI Platform
tensorlayer-2.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 658.3 kB

Release files / tensorlayer-2.2.5.tar.gz

Download URL tensorlayer-2.2.5.tar.gz
Size 277.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d74e6ebd8b4bf8b62300f70f8e42429100c3a5b8bdad39f038384cbc8315a33c
BLAKE2b-256 checksum
How to use checksums
449e2806af7a4c4e6948342247444e8341df20eee806d98a68b1f1274faf5cb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release files / tensorlayer-2.2.5-py3-none-any.whl

Download URL tensorlayer-2.2.5-py3-none-any.whl
Size 381.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21a169db7b00945eed690c615587a186d0657e05e0669faa883655cc7fcb523d
BLAKE2b-256 checksum
How to use checksums
6626cb5ace43834ec794cab2413a19c68391976036da90da5fe83e190e4ded4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release history Release notifications | RSS feed

This release

2.2.5 This release

2 release files

2.2.3

3 release files

2.2.2

3 release files

2.2.1

3 release files

2.1.0

3 release files

2.0.2

3 release files

2.0.1

3 release files

2.0.0

3 release files

1.11.1

3 release files

1.11.0

3 release files

1.9.1

3 release files

1.9.0

3 release files

1.8.5

3 release files

1.8.4

1 release file

1.8.3

1 release file

1.8.2

1 release file

1.8.1

1 release file

1.8.0

1 release file

1.7.4

1 release file

1.7.3

1 release file

1.7.2

1 release file

1.7.1

1 release file

1.7.0

1 release file

1.6.7

1 release file

1.6.6

1 release file

1.6.5

2 release files

1.6.4

1 release file

1.6.3

1 release file

1.6.2

1 release file

1.6.1

1 release file

1.6.0

1 release file

1.5.4

1 release file

1.5.3

1 release file

1.5.2

1 release file

1.5.1

1 release file

1.5.0

1 release file

1.4.5

1 release file

1.4.4

1 release file

1.4.3

1 release file

1.4.2

1 release file

1.4.1

1 release file

1.3.11

1 release file

1.3.10

1 release file

1.3.9

1 release file

1.3.8

1 release file

1.3.7

1 release file

1.3.6

1 release file

1.3.5

1 release file

1.3.4

1 release file

1.3.3

1 release file

1.3.2

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.8

1 release file

1.2.7

1 release file

1.2.6

1 release file

1.2.5

1 release file

1.2.4

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2

1 release file

1.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page