GithubHelp home page GithubHelp logo

baoerpoo / tensorlayer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tensorlayer/tensorlayer

0.0 2.0 0.0 46.9 MB

TensorLayer: A Deep Learning and Reinforcement Learning Library for Researchers and Engineers.

Home Page: http://tensorlayer.readthedocs.io

License: Other

Ruby 0.06% Makefile 0.11% Python 99.78% Shell 0.04%

tensorlayer's Introduction

PyPI version Codacy Badge Gitter Build Status Documentation Status Docker Pulls PyUP Updates Python 3

TensorLayer is a deep learning and reinforcement learning library on top of TensorFlow. It provides rich neural layers and utility functions to help researchers and engineers build real-world AI applications. TensorLayer is awarded the 2017 Best Open Source Software by the prestigious ACM Multimedia Society.



News

Installation

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:

# for master version (Recommended)
$ pip install git+https://github.com/tensorlayer/tensorlayer.git

# for last stable version
$ pip install tensorlayer

# for latest release candidate
$ pip install --pre tensorlayer

If you prefer to build from sources in a development objective

# First clone the repository
$ git clone https://github.com/tensorlayer/tensorlayer.git
$ cd tensorlayer

# Install virtualenv if necessary
$ pip install virtualenv

# Then create a virtualenv called venv inside
$ virtualenv venv

# Activate the virtualenv  

# Linux:
$ source venv/bin/activate

# Windows:
$ venv\Scripts\activate.bat

# for a machine **without** an NVIDIA GPU
$ pip install -e .[tf_cpu,db,dev,test,doc]

# for a machine **with** an NVIDIA GPU
$ pip install -e .[tf_gpu,db,dev,test,doc]

Dockerfile is supplied to build images, build as usual

# for CPU version
$ docker build -t tensorlayer:latest .

# for GPU version
$ docker build -t tensorlayer:latest-gpu -f Dockerfile.gpu .

Launching the unittest:

$ pytest

Please check documentation for detailed instructions.

Examples and Tutorials

Examples can be found in this folder and Github topic.

Basics

Vision

Adversarial Learning

Natural Language Processing

Reinforcement Learning

Pretrained Models

Miscellaneous

Notes

TensorLayer provides two set of Convolutional layer APIs, see (Advanced) and (Basic) on readthedocs website.

Features

Design Philosophy

As TensorFlow users, we have been looking for a library that can serve for various development phases. This library is easy for beginners by providing rich neural network implementations, examples and tutorials. Later, its APIs shall naturally allow users to leverage the powerful features of TensorFlow, exhibiting best performance in addressing real-world problems. In the end, the extra abstraction shall not compromise TensorFlow performance, and thus suit for production deployment. TensorLayer is a novel library that aims to satisfy these requirements. It has three key features:

  • Simplicity : TensorLayer lifts the low-level dataflow abstraction of TensorFlow to high-level layers. It also provides users with massive examples and tutorials to minimize learning barrier.
  • Flexibility : TensorLayer APIs are transparent: it does not mask TensorFlow from users; but leaving massive hooks that support diverse low-level tuning.
  • Zero-cost Abstraction : TensorLayer is able to achieve the full performance of TensorFlow.

Negligible Overhead

TensorLayer has negligible performance overhead. We benchmark classic deep learning models using TensorLayer and native TensorFlow on a Titan X Pascal GPU. Here are the training speeds of respective tasks:

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

Compared with Keras and TFLearn

Similar to TensorLayer, Keras and TFLearn are also popular TensorFlow wrapper libraries. These libraries are comfortable to start with. They provide high-level abstractions; but mask the underlying engine from users. It is thus hard to customize model behaviors and touch the essential features of TensorFlow. Without compromise in simplicity, TensorLayer APIs are generally more flexible and transparent. Users often find it easy to start with the examples and tutorials of TensorLayer, and then dive into the TensorFlow low-level APIs only if need. TensorLayer does not create library lock-in. Users can easily import models from Keras, TFSlim and TFLearn into a TensorLayer environment.

Documentation

The documentation [Online] [PDF] [Epub] [HTML] describes the usages of TensorLayer APIs. It is also a self-contained document that walks through different types of deep neural networks, reinforcement learning and their applications in Natural Language Processing (NLP) problems.

We have included the corresponding modularized implementations of Google TensorFlow Deep Learning tutorial, so you can read the TensorFlow tutorial [en] [cn] along with our document. Chinese documentation is also available.

Academic and Industry Users

TensorLayer has an open and fast growing community. It has been widely used by researchers from Imperial College London, Carnegie Mellon University, Stanford University, Tsinghua University, UCLA, Linköping University and etc., as well as engineers from Google, Microsoft, Alibaba, Tencent, Penguins Innovate, ReFULE4, Bloomberg, GoodAILab and many others.

  • 🇬🇧 If you have any question, we suggest to create an issue to discuss with us.
  • 🇨🇳 我们有中文讨论社区: 如QQ群微信群.

Contribution Guideline

Guideline in 5 lines

Citation

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.

tensorlayer's People

Contributors

zsdonghao avatar luomai avatar lgarithm avatar wagamamaz avatar dekhtiarjonathan avatar jorgemf avatar shorxp avatar tomtung avatar fangde avatar vyokky avatar angerhang avatar joelkronander avatar geometrikal avatar dbusbridge avatar 2wins avatar boscotsang avatar shielian avatar akaraspt avatar wangg12 avatar pyup-bot avatar nebulav avatar xionghhcs avatar yzwxx avatar sunbohit avatar inewstut avatar lllcho avatar deepxiangfa avatar yugnaynehc avatar sczhengyabin avatar mitar avatar

Watchers

James Cloos avatar Plato Xu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.