You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Eric_lai 3dfd181d72 Add MaskedConv3d 11 hours ago
.circleci Update config.yml 1 year ago
.github PyUP - Dependency Update Scheduled daily dependency update on wednesday (#647) 3 years ago
docker yapf 1 year ago
docs update quan dense and conv 4 weeks ago
examples Update torch backend 3 weeks ago
img Update README.md 3 months ago
requirements update tensorlayer3 4 months ago
scripts Transparent distributed model training through TensorLayer GPU Trainer (#700) 3 years ago
tensorlayer Add MaskedConv3d 11 hours ago
tests Update initilizers 2 months ago
.codacy.yaml Update .codacy.yaml 1 year ago
.dockerignore fix Dokerfile: use tensorflow cpu base image by default 3 years ago
.gitignore move data 2 years ago
.pyup.yml Contrib Loggers Module Added - Hyperdash (#739) 3 years ago
.readthedocs.yml Documentation/mock imports (#785) 3 years ago
.travis.yml Make TensorFlow 2.0 rc1 compatible release. (#1043) 2 years ago
CHANGELOG.md Merge branch 'master' into Release 1 year ago
CONTRIBUTING.md update CONTRIBUTING.md for rst usage 2 years ago
LICENSE.rst Update LICENSE.rst 1 year ago
Makefile Fix build test. (#1057) 1 year ago
README.md 更新 'README.md' 2 months ago
README.rst Update README.rst 2 months ago
setup.cfg Update setup.cfg 1 year ago
setup.py fix yapf errors 1 year ago
setup.travis.cfg Update setup.travis.cfg 2 years ago
setup.travis_doc.cfg Tl logging layer name fix (#683) 3 years ago
tensorlayer_cn.md 更新 'tensorlayer_cn.md' 3 months ago
tl Introduce an experimental CLI to help train TL programs using multiple GPUs. (#287) 3 years ago

README.md

GitHub last commit (branch)
Supported TF Version
Documentation Status
Build Status
Downloads
Downloads
Docker Pulls
Codacy Badge

中文简介

TensorLayer is a deep learning library designed for researchers and engineers that is compatible with multiple deep learning frameworks. 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 iHub and Gitee.

News

🔥 3.0.0 has been pre-released, it supports TensorFlow and MindSpore backends, and supports some PaddlePaddle operator backends, allowing users to run the code on different hardware like Nvidia-GPU and Huawei-Ascend. It will support TensorFlow, MindSpore, PaddlePaddle, and PyTorch backends in the future. Feel free to use it and make suggestions. We need more people to join the dev team, if you are interested, please email hao.dong@pku.edu.cn

🔥 Reinforcement Learning Zoo: Low-level APIs for professional usage, High-level APIs for simple usage, and a corresponding Springer textbook

🔥 Sipeed Maxi-EMC: Run TensorLayer models on the low-cost AI chip (e.g., K210) (Alpha Version)

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

Multilingual Documents

TensorLayer has extensive documentation for both beginners and professionals. The documentation is available in
both English and Chinese.

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.

Extensive Examples

You can find a large collection of examples that use TensorLayer in here and the following space:

Getting Start

Comparison of TensorLayer version

TensorLayer 3.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 version

Install the stable release of TensorLayer3:

pip3 install tensorlayer3

Install the stable release of TensorLayer2.x:

pip3 install tensorlayer

Install the unstable development version of TensorLayer3:

pip3 install git+https://git.openi.org.cn/TensorLayer/tensorlayer3.0.git

If 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` dependencies

If you want to use mindspore backend, you should install mindspore>=1.2.1

pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.2.1/MindSpore/gpu/ubuntu_x86/cuda-10.1/mindspore_gpu-1.2.1-cp37-cp37m-linux_x86_64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple

If you want to use paddlepaddle backend, you should install paddlepaddle>=2.1.1

python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple

If 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.0

Performance Benchmark

The 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
TensorLayer 3.0 channel last

Getting Involved

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.



Citing TensorLayer

If you find TensorLayer useful for your project, please cite the following 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}
}

简介

TensorLayer3.0一款兼容多深度学习框架后端的深度学习库, 目前可以用TensorFlow、MindSpore、PaddlePaddle作为后端计算引擎。

Python Markdown INI other

贡献者 (174)

contact@jonathandekhtiar.eu luo.mai.cs@gmail.com github-bot@pyup.io lg4869@outlook.com jingqing.zhang15@imperial.ac.uk 37874862+warshallrho@users.noreply.github.com DEKHTIARJonathan@users.noreply.github.com laicheng_VIP@163.com rundi_wu@pku.edu.cn 1402434478@qq.com lgarithm@users.noreply.github.com twinkyu@live.com lingjunliu@LingjundeMacBook-Pro.local dhsig552@gmail.com ivbensekin@gmail.com liusichao131@163.com wagamamaz@users.noreply.github.com Windaway@live.com haodong@DHs-MacBook-Pro15.local boldjoel@gmail.com haodong@dyn1227-34.wlan.ic.ac.uk jorgemf@gmail.com hibana1983@gmail.com zhangjqsmiling@gmail.com iofficium@163.com 34995488+Tokarev-TT-33@users.noreply.github.com 13474505291@163.com 398712463@qq.com junbinwang@dyn3192-150.wlan.ic.ac.uk lllcho@outlook.com joelkronander@gmail.com One-sixth@users.noreply.github.com AutuanLiu@gmail.com 30773960+XJTUWYD@users.noreply.github.com haodong@dhs-mbp15.home haodong@dyn1226-196.wlan.ic.ac.uk haodong@dyn1231-41.wlan.ic.ac.uk haodong@dyn1225-249.wlan.ic.ac.uk cclauss@bluewin.ch 7678676@qq.com haodong@dyn1230-177.wlan.ic.ac.uk 45243763+ArnoldLIULJ@users.noreply.github.com haodong@dyn1230-218.wlan.ic.ac.uk haodong@dyn1226-209.wlan.ic.ac.uk haodong@dyn1228-249.wlan.ic.ac.uk haodong@dyn1230-59.wlan.ic.ac.uk lingjunliu@lingjundembp.home 3139658+tiancheng2000@users.noreply.github.com tom.tung.dyb@gmail.com 872198636@qq.com haodong@DHs-MBP15.home haodong@dyn1227-42.wlan.ic.ac.uk haodong@dyn1228-88.wlan.ic.ac.uk ShieLian@users.noreply.github.com 10713581+zsdonghao@users.noreply.github.com haodong@dyn1241-12.vpn.ic.ac.uk junbinwang@dyn3202-50.wlan.ic.ac.uk 1137743903@qq.com ross.g.marchant@gmail.com shorxp@gmail.com chulei0809@gmail.com 514140809@qq.com boscotsang3@gmail.com 73918561+hanjr92@users.noreply.github.com simiao.yu3@gmail.com wangg12@users.noreply.github.com junbinwang@EvendeMacBook-Pro.local jianhong.wang16@imperial.ac.uk kongsea@gmail.com luo.mai11@imperial.ac.uk Thinkre7@gmail.com yingda.yin@gmail.com 18811472492@163.com 34828909+ndiy@users.noreply.github.com autuanliu@163.com liangyi2012@gmail.com t-lamai@microsoft.com shorxp@users.noreply.github.com sczhengyabin@hotmail.com cyyyyc123@hotmail.com dengyueyun666@sina.com i.mochaz@gmail.com craigleehi@gmail.com dan.busbridge@gmail.com 472675005@qq.com wangjianhong1993@Jianhongs-MacBook-Pro.local ZIJIA290906377@gmail.com pn.appdev@gmail.com teavana@node-01.ivq0zixsvjdunbjgpyljr2lzpf.ix.internal.cloudapp.net coldswamp@gmail.com alessio@checkoutfree.it zy5015@ic.ac.uk akaitsuki.ii@gmail.com dakuang7@gmail.com daniel.busbridge@googlemail.com haodong@dyn1228-164.wlan.ic.ac.uk haodong@dyn1231-130.wlan.ic.ac.uk haodong@dyn1227-186.wlan.ic.ac.uk haodong@dyn1227-59.wlan.ic.ac.uk haodong@dyn1228-148.wlan.ic.ac.uk haodong@dyn1228-186.wlan.ic.ac.uk jyneda@gmail.com chengzehua@outlook.com mitar.github@tnode.com 46805564+Gyx-One@users.noreply.github.com thangvubk@gmail.com badger@codacy.com Yinong@longyinongdeMacBook-Pro.local sreekanthroot@gmail.com 472480578@qq.com dvklopfenstein@users.noreply.github.com badges@fossa.io hansheng@refuel4.com huangyanhua@baidu.com admin@418sec.com yangchengreg@163.com 52134165+prakhargoyal106@users.noreply.github.com ssdf93@gmail.com a824834@163.com 314913739@qq.com xionghhcs@163.com arisliang@users.noreply.github.com contact@boyuandeng.me chentao904@163.com craigleehi@users.noreply.github.com dvklopfenstein@gmail.com xupeng1724477385@gmail.com dan.busbridge@babylonhealth.com d.alonso-alvarez@imperial.ac.uk haodong@dyn1225-176.wlan.ic.ac.uk haodong@dyn1231-63.wlan.ic.ac.uk Earthson.Lu@gmail.com encodets@gmail.com ericvulpi@gmail.com 767105779@qq.com haodong@dyn1226-76.wlan.ic.ac.uk haodong@dyn1231-116.wlan.ic.ac.uk haodong@dyn1241-36.vpn.ic.ac.uk hq45896@wa2.so-net.ne.jp cnglen@gmail.com hjm946637@hotmail.com jorgemf@users.noreply.github.com zhaohao.zeng93@gmail.com michael@lianghan.org 43709858+OliverZijia@users.noreply.github.com pnpnpn@users.noreply.github.com SmartAILM@users.noreply.github.com toori67@gmail.com suyog.jadhav1@gmail.com tim.gates@iress.com lucklyric@gmail.com nandayanger@gmail.com squarefk@gmail.com tomtung@users.noreply.github.com alpc66@163.com h.yuan@jacobs-university.de 9587977+elmuz@users.noreply.github.com fengjiran@foxmail.com guohuawu.wgh@alibaba-inc.com kongsea@live.com rladhkstn8@gmail.com qiuxin0110@gmail.com selay01@users.noreply.github.com liuzxzju@gmail.com travis.borsa@gmail.com xian.yang08@imperial.ac.uk 1600012806@pku.edu.cn xjx524@gmail.com anxingle@163.com