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.
hanjr92 cf958206fd fix rnn construct graph 2 days ago
.circleci Update config.yml 2 years ago
.github PyUP - Dependency Update Scheduled daily dependency update on wednesday (#647) 4 years ago
docker yapf 2 years ago
docs fix all pooling layer 2 weeks ago
examples fix rnn gru lstm bug 2 days ago
requirements Added TF collection of list parameters 1 week ago
tensorlayerx fix rnn construct graph 2 days ago
tests Merge branch 'master' of git.openi.org.cn:OpenI/TensorLayerX 2 weeks ago
.dockerignore fix Dokerfile: use tensorflow cpu base image by default 4 years ago
.gitignore move data 3 years ago
.pyup.yml Contrib Loggers Module Added - Hyperdash (#739) 4 years ago
.readthedocs.yml Documentation/mock imports (#785) 3 years ago
LICENSE.rst Update LICENSE.rst 1 year ago
README.md Fix torch backend manual naming and added layer names cannot repeated 2 weeks ago
README.rst Update TensorLayerX 3 months ago
setup.cfg Update setup.cfg 2 years ago
setup.py TensorLayerX 0.5.5 release 6 days ago
tlx Update TensorLayerX 3 months ago

README.md

GitHub last commit (branch)
Documentation Status
Build Status
Downloads

TensorLayerX 是一个跨平台开发框架,可以运行在各类操作系统和AI硬件上,并支持混合框架的开发。目前支持TensorFlow、MindSpore、PaddlePaddle框架常用神经网络层以及算子,PyTorch支持特性正在开发中,支持列表

设计特点

TensorLayerX相比于之前开发的 TensorLayer有着更加强大的功能,它兼容多种计算框架后端。

TensorLayer各个版本对比

TensorLayerX继承了之前版本的特性,包括简单性,灵活性和低级抽象。 TensorLayerX支持多后端,如TensorFlow, MindSpore, PaddlePaddle和PyTorch。
它允许用户在不同的硬件上运行相同的代码,比如Nvidia-GPU和HuaWei-Ascend。TensorLayerX的更多功能正在开发中。

  • 模型库: 构建包含经典模型和sota模型的系列模型库,涵盖CV、NLP、RL等领域。

  • 模型部署: TensorLayerX将支持ONNX协议,支持模型导出、导入和部署。

  • 并行训练: 为了支持并行训练,数据并行已列入开发计划中。

快速使用

  • 安装
# install from pypi
pip3 install tensorlayerx 
# install from Github
pip3 install git+https://git.openi.org.cn/OpenI/TensorLayerX.git 

更多的安装详情可以参考 Installtion

  • 定义模型

你可以立即使用tensorlayerx来定义一个模型,在后台使用你最喜欢的框架,例如:

import os
os.environ['TL_BACKEND'] = 'tensorflow' # modify this line, switch to any framework easily!
#os.environ['TL_BACKEND'] = 'mindspore'
#os.environ['TL_BACKEND'] = 'paddle'
#os.environ['TL_BACKEND'] = 'torch'
import tensorlayerx as tlx
from tensorlayerx.nn import Module
from tensorlayerx.nn import Linear
class CustomModel(Module):

  def __init__(self):
      super(CustomModel, self).__init__()

      self.linear1 = Linear(out_features=800, act=tlx.ReLU, in_features=784)
      self.linear2 = Linear(out_features=800, act=tlx.ReLU, in_features=800)
      self.linear3 = Linear(out_features=10, act=None, in_features=800)

  def forward(self, x, foo=False):
      z = self.linear1(x)
      z = self.linear2(z)
      out = self.linear3(z)
      if foo:
          out = tlx.softmax(out)
      return out

MLP = CustomModel()
MLP.set_eval()

文档

TensorLayerX为初学者和专业人士提供了大量的文档。

English Documentation

使用例子

  • 基础例子 for tutorials
  • OpenIVA an easy-to-use product-level deployment framework
  • TLXZoo pretrained models/backbones🚧
  • TLXCV a bunch of Computer Vision applications🚧
  • TLXNLP a bunch of Natural Language Processing applications🚧
  • TLXRL a bunch of Reinforcement Learning applications, check RLZoo for the old version

联系方式

引用方式

如果你觉得TensorLayerX对你的项目有用,请引用以下文章:

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