Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #677

Merged
merged 16 commits into from Jun 4, 2018
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -87,6 +87,7 @@ To release a new version, please update the changelog as followed:
- py3 + cpu
- py3 + gpu
- Documentation:
- Clean README (by @luomai in #677)
- Release semantic version added on index page (by @DEKHTIARJonathan in #633)
- Optimizers page added (by @DEKHTIARJonathan in #636)
- `AMSGrad` added on Optimizers page added (by @DEKHTIARJonathan in #636)
Expand Down
82 changes: 31 additions & 51 deletions README.md
Expand Up @@ -4,18 +4,23 @@
</div>
</a>

[![Build Status](https://img.shields.io/travis/tensorlayer/tensorlayer.svg?label=Travis&branch=master)](https://travis-ci.org/tensorlayer/tensorlayer)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ca2a29ddcf7445588beff50bee5406d9)](https://app.codacy.com/app/tensorlayer/tensorlayer)
[![Mentioned in Awesome TensorLayer](https://awesome.re/mentioned-badge.svg)](https://github.com/tensorlayer/awesome-tensorlayer)
[![English Documentation](https://img.shields.io/badge/documentation-english-blue.svg)](https://tensorlayer.readthedocs.io/)
[![Chinese Documentation](https://img.shields.io/badge/documentation-中文-blue.svg)](https://tensorlayercn.readthedocs.io/)
[![Chinese Book](https://img.shields.io/badge/book-中文-blue.svg)](http://www.broadview.com.cn/book/5059/)

[![PyPI version](https://badge.fury.io/py/tensorlayer.svg)](https://pypi.org/project/tensorlayer/)
[![Github commits (since latest release)](https://img.shields.io/github/commits-since/tensorlayer/tensorlayer/latest.svg)](https://github.com/tensorlayer/tensorlayer/compare/1.8.6rc1...master)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tensorlayer.svg)](https://pypi.org/project/tensorlayer/)
[![Supported TF Version](https://img.shields.io/badge/tensorflow-1.6.0+-blue.svg)](https://github.com/tensorflow/tensorflow/releases)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ca2a29ddcf7445588beff50bee5406d9)](https://app.codacy.com/app/tensorlayer/tensorlayer)

[![Build Status](https://img.shields.io/travis/tensorlayer/tensorlayer.svg?label=Travis&branch=master)](https://travis-ci.org/tensorlayer/tensorlayer)
[![CircleCI](https://img.shields.io/circleci/project/github/tensorlayer/tensorlayer.svg?label=Docker%20Build&branch=master)](https://circleci.com/gh/tensorlayer/tensorlayer/tree/master)
[![Docker Pulls](https://img.shields.io/docker/pulls/tensorlayer/tensorlayer.svg?maxAge=604800)](https://hub.docker.com/r/tensorlayer/tensorlayer/)
[![Documentation Status](https://img.shields.io/readthedocs/tensorlayer/latest.svg?label=ReadTheDocs-EN)](https://tensorlayer.readthedocs.io/)
[![Documentation Status](https://img.shields.io/readthedocs/tensorlayercn/latest.svg?label=ReadTheDocs-CN)](https://tensorlayercn.readthedocs.io/)
[![PyUP Updates](https://pyup.io/repos/github/tensorlayer/tensorlayer/shield.svg)](https://pyup.io/repos/github/tensorlayer/tensorlayer/)
[![Docker Pulls](https://img.shields.io/docker/pulls/tensorlayer/tensorlayer.svg?maxAge=604800)](https://hub.docker.com/r/tensorlayer/tensorlayer/)

<br/>

Expand All @@ -27,62 +32,37 @@

<br/>

[![Mentioned in Awesome TensorLayer](https://awesome.re/mentioned-badge.svg)](https://github.com/tensorlayer/awesome-tensorlayer)
[![English Documentation](https://img.shields.io/badge/documentation-english-blue.svg)](https://tensorlayer.readthedocs.io/)
[![Chinese Documentation](https://img.shields.io/badge/documentation-中文-blue.svg)](https://tensorlayercn.readthedocs.io/)
[![Chinese Book](https://img.shields.io/badge/book-中文-blue.svg)](http://www.broadview.com.cn/book/5059/)

TensorLayer is a deep learning and reinforcement learning library on top of [TensorFlow](https://www.tensorflow.org). 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](http://www.acmmm.org/2017/mm-2017-awardees/).
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](http://www.acmmm.org/2017/mm-2017-awardees/).

# Why another deep learning library: TensorLayer

## Features

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 [rich examples](https://github.com/tensorlayer/awesome-tensorlayer) 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 has negligible overheads and can thus achieve the *full performance* of TensorFlow.

## Negligible overhead

To show the overhead, we train classic deep learning models using TensorLayer and native TensorFlow
on a Titan X Pascal GPU.

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

As deep learning practitioners, we have been looking for a library that can address various development
purposes. This library is easy to adopt by providing diverse examples, tutorials and pre-trained models.
Also, it allow users to easily fine-tune TensorFlow; while being suitable for production deployment. TensorLayer aims to satisfy all these purposes. It has three key features:

## Why using TensorLayer instead of Keras or TFLearn
- ***Simplicity*** : TensorLayer lifts the low-level dataflow interface of TensorFlow to *high-level* layers / models. It is very easy to learn through the rich [example codes](https://github.com/tensorlayer/awesome-tensorlayer) contributed by a wide community.
- ***Flexibility*** : TensorLayer APIs are transparent: it does not mask TensorFlow from users; but leaving massive hooks that help *low-level tuning* and *deep customization*.
- ***Zero-cost Abstraction*** : TensorLayer can achieve the *full power* of TensorFlow. The following table shows the training speeds of classic models using TensorLayer and native TensorFlow on a Titan X Pascal GPU.

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

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.

TensorLayer has a fast growing usage in academic and industry organizations. It is used by researchers from
Imperial College London, Carnegie Mellon University, Stanford University,
University of Technology of Compiegne (UTC), Tsinghua University, UCLA,
and etc., as well as engineers from Google, Microsoft, Alibaba, Tencent, Xiaomi, Penguins Innovate, Bloomberg and many others.
TensorLayer stands at a unique spot in the library landscape. Other wrapper libraries like Keras and TFLearn also provide high-level abstractions. They, however, often
hide the underlying engine from users, which make them hard to customize
and fine-tune. On the contrary, TensorLayer APIs are generally flexible and transparent.
Users often find it easy to start with the examples and tutorials, and then dive
into TensorFlow seamlessly. In addition, TensorLayer does not create library lock-in through native supports for importing components from Keras, TFSlim and TFLearn.

# Installation
TensorLayer has a fast growing usage among top researchers and engineers, from universities like
Imperial College London, UC Berkeley, Carnegie Mellon University, Stanford University, and
University of Technology of Compiegne (UTC), and companies like Google, Microsoft, Alibaba, Tencent, Xiaomi, and Bloomberg.

TensorLayer has pre-requisites including TensorFlow, numpy, matplotlib and nltk (optional). For GPU support, CUDA and cuDNN are required.
# Install

The simplest way to install TensorLayer is to use the Python Package Index (PyPI):
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 to use the Python Package Index (PyPI):

```bash
# for last stable version
Expand Down Expand Up @@ -129,11 +109,11 @@ 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 to TensorLayer
# Contribute

Please read the [Contributor Guideline](https://github.com/tensorlayer/tensorlayer/blob/rearrange-readme/CONTRIBUTING.md) before submitting your PRs.

# Citation
# Cite
If you find this project useful, we would be grateful if you cite the TensorLayer paper:

```
Expand Down