Deep Learning and Reinforcement Learning Library for Scientists and Engineers
Deep Learning and Reinforcement Learning Library for Scientists and Engineers
TensorLayer is a novel TensorFlow-based deep learning and reinforcement learning library designed for researchers and engineers. It provides an extensive collection of customizable neural layers to build advanced AI models quickly, based on this, the community open-sourced mass tutorials and applications. TensorLayer is awarded the 2017 Best Open Source Software by the ACM Multimedia Society. This project can also be found at OpenI and Gitee.
TensorLayer is a new deep learning library designed with simplicity, flexibility and high-performance in mind.
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.
TensorLayer has extensive documentation for both beginners and professionals. The documentation is available in both English and Chinese. If you want to try the experimental features on the the master branch, you can find the latest document here.
You can find a large collection of examples that use TensorLayer in here and the following space:
TensorLayer 2.0 relies on TensorFlow, numpy, and others. To use GPUs, CUDA and cuDNN are required.
Install TensorFlow:
pip3 install tensorflow-gpu==2.0.0-rc1 # TensorFlow GPU (version 2.0 RC1)
pip3 install tensorflow # CPU versionInstall the stable release of TensorLayer:
pip3 install tensorlayerInstall the unstable development version of TensorLayer:
pip3 install git+https://github.com/tensorlayer/tensorlayer.gitIf you want to install the additional dependencies, you can also run
pip3 install --upgrade tensorlayer[all] # all additional dependencies
pip3 install --upgrade tensorlayer[extra] # only the `extra` dependencies
pip3 install --upgrade tensorlayer[contrib_loggers] # only the `contrib_loggers` dependenciesIf you are TensorFlow 1.X users, you can use TensorLayer 1.11.0:
# For last stable version of TensorLayer 1.X
pip3 install --upgrade tensorlayer==1.11.0The following table shows the training speeds of VGG16 using TensorLayer and native TensorFlow on a TITAN Xp.
| Mode | Lib | Data Format | Max GPU Memory Usage(MB) | Max CPU Memory Usage(MB) | Avg CPU Memory Usage(MB) | Runtime (sec) |
|---|---|---|---|---|---|---|
| AutoGraph | TensorFlow 2.0 | channel last | 11833 | 2161 | 2136 | 74 |
| TensorLayer 2.0 | channel last | 11833 | 2187 | 2169 | 76 | |
| Graph | Keras | channel last | 8677 | 2580 | 2576 | 101 |
| Eager | TensorFlow 2.0 | channel last | 8723 | 2052 | 2024 | 97 |
| TensorLayer 2.0 | channel last | 8723 | 2010 | 2007 | 95 |
Please read the Contributor Guideline before submitting your PRs.
We suggest users to report bugs using Github issues. Users can also discuss how to use TensorLayer in the following slack channel.
If you find TensorLayer useful for your project, please cite the following papers:
…[Security] Arbitrary code execution via eval() of the HDF5 model_config attribute (Model.load / tl.files.load_hdf5_graph)
A error about Q_learning
A error abot
There are errors in the source code(源代码写的有错误)
'tensorflow.python.framework.ops.EagerTensor' object has no attribute '_info'
如何使用贝尔曼期望方程计算价值函数 V (s)?
Questions about PPO
module 'tensorflow' has no attribute 'placeholder'
Grammatical error
Can't get VGG: urllib.error.HTTPError: HTTP Error 404: Not Found