Skip to content

Commit df8e339

Browse files
committed
Merge branch 'quantized_layer' of github.com:Laicheng0830/tensorlayer into quantized_layer
2 parents 435d268 + f302ad1 commit df8e339

File tree

134 files changed

+5039
-622
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+5039
-622
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<!--- [![Documentation Status](https://readthedocs.org/projects/tensorlayercn/badge/)](https://tensorlayercn.readthedocs.io/)
2121
<!--- [![PyUP Updates](https://pyup.io/repos/github/tensorlayer/tensorlayer/shield.svg)](https://pyup.io/repos/github/tensorlayer/tensorlayer/) --->
2222

23-
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 complex AI models. TensorLayer is awarded the 2017 Best Open Source Software by the [ACM Multimedia Society](https://twitter.com/ImperialDSI/status/923928895325442049).
23+
[TensorLayer](https://tensorlayer.readthedocs.io) 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 complex AI models. TensorLayer is awarded the 2017 Best Open Source Software by the [ACM Multimedia Society](https://twitter.com/ImperialDSI/status/923928895325442049).
2424
TensorLayer can also be found at [iHub](https://code.ihub.org.cn/projects/328) and [Gitee](https://gitee.com/organizations/TensorLayer).
2525

2626
# News
@@ -178,4 +178,4 @@ If you find TensorLayer useful for your project, please cite the following paper
178178
url = {http://tensorlayer.org},
179179
year = {2017}
180180
}
181-
```
181+
```

docs/user/get_involved.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ Ph.D. Postition @ PKU
99

1010

1111
Hi, I am `Hao Dong <https://zsdonghao.github.io/>`__, the founder of this project and a new faculty member in EECS, Peking University. I now have a few Ph.D. positions per year open for international students who would like to study AI. If you or your friends are interested in it, feel free to contact me.
12-
PKU is a top 30 university in the global ranking. The application is competitive, apply early is recommended. For the application of next year, please note that the DDL of Chinese Government Scholarship is in the end of each year, please check this `link <http://www.isd.pku.edu.cn/info/1503/5676.htm>`__ for more details.
12+
PKU is a top 30 university in the global ranking. The application is competitive, apply early is recommended. Please check the following links for more details.
1313

14-
My homepage: `https://zsdonghao.github.io <https://zsdonghao.github.io/>`__
14+
- `About the International Elite Ph.D. Program in Computer Science <https://cs.pku.edu.cn/info/1115/2233.htm>`__
15+
- `My homepage <https://zsdonghao.github.io/>`__
1516

1617
Contact: hao.dong [AT] pku.edu.cn
1718

docs/user/installation.rst

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ For stable version:
3535
.. code-block:: bash
3636
3737
pip3 install tensorlayer
38+
39+
pip install tensorlayer -i https://pypi.tuna.tsinghua.edu.cn/simple (faster in China)
3840
3941
For latest version, please install from Github.
4042

@@ -60,7 +62,7 @@ Alternatively, you can build from the source.
6062
cd tensorlayer
6163
6264
# Install virtualenv if necessary
63-
pip install virtualenv
65+
sudo pip3 install virtualenv
6466
# Then create a virtualenv called `venv`
6567
virtualenv venv
6668
@@ -73,29 +75,29 @@ Alternatively, you can build from the source.
7375
venv\Scripts\activate.bat
7476
7577
# basic installation
76-
pip install .
78+
pip3 install .
7779
7880
# ============= IF TENSORFLOW IS NOT ALREADY INSTALLED ============= #
7981
8082
# for a machine **without** an NVIDIA GPU
81-
pip install -e ".[all_cpu_dev]"
83+
pip3 install -e ".[all_cpu_dev]"
8284
8385
# for a machine **with** an NVIDIA GPU
84-
pip install -e ".[all_gpu_dev]"
86+
pip3 install -e ".[all_gpu_dev]"
8587
8688
If you want install TensorLayer 1.X, the simplest way to install TensorLayer 1.X is as follow. It will also install the numpy and matplotlib automatically.
8789

8890
.. code-block:: bash
8991
90-
[stable version] pip install tensorlayer==1.x.x
92+
[stable version] pip3 install tensorlayer==1.x.x
9193
9294
However, if you want to modify or extend TensorLayer 1.X, you can download the repository from
9395
`Github`_ and install it as follow.
9496

9597
.. code-block:: bash
9698
9799
cd to the root of the git tree
98-
pip install -e .
100+
pip3 install -e .
99101
100102
This command will run the ``setup.py`` to install TensorLayer. The ``-e`` reflects
101103
editable, then you can edit the source code in ``tensorlayer`` folder, and ``import`` the edited
@@ -194,9 +196,9 @@ For TensorLayer, please refer to the steps mentioned above.
194196

195197
.. code-block:: bash
196198
197-
pip install tensorflow #CPU version
198-
pip install tensorflow-gpu   #GPU version (GPU version and CPU version just choose one)
199-
pip install tensorlayer       #Install tensorlayer
199+
pip3 install tensorflow #CPU version
200+
pip3 install tensorflow-gpu   #GPU version (GPU version and CPU version just choose one)
201+
pip3 install tensorlayer       #Install tensorlayer
200202
201203
202204

examples/basic_tutorials/tutorial_cifar10_cnn_static.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import numpy as np
66
import multiprocessing
77
import tensorflow as tf
8+
89
import tensorlayer as tl
910
from tensorlayer.layers import (BatchNorm, Conv2d, Dense, Flatten, Input, LocalResponseNorm, MaxPool2d)
1011
from tensorlayer.models import Model
@@ -122,7 +123,7 @@ def _map_fn_train(img, target):
122123

123124
def _map_fn_test(img, target):
124125
# 1. Crop the central [height, width] of the image.
125-
img = tf.image.resize_with_crop_or_pad(img, 24, 24)
126+
img = tf.image.resize_with_pad(img, 24, 24)
126127
# 2. Subtract off the mean and divide by the variance of the pixels.
127128
img = tf.image.per_image_standardization(img)
128129
img = tf.reshape(img, (24, 24, 3))

examples/basic_tutorials/tutorial_mnist_mlp_dynamic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import time
22
import numpy as np
33
import tensorflow as tf
4+
45
import tensorlayer as tl
56
from tensorlayer.layers import Dense, Dropout, Input
67
from tensorlayer.models import Model

examples/basic_tutorials/tutorial_mnist_mlp_dynamic_2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import time
22
import numpy as np
33
import tensorflow as tf
4+
45
import tensorlayer as tl
56
from tensorlayer.layers import Dense, Dropout, Input, LayerList
67
from tensorlayer.models import Model

examples/basic_tutorials/tutorial_mnist_mlp_static.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import pprint
12
import time
23
import numpy as np
34
import tensorflow as tf
5+
46
import tensorlayer as tl
57
from tensorlayer.layers import Dense, Dropout, Input
68
from tensorlayer.models import Model
@@ -29,7 +31,6 @@ def get_model(inputs_shape):
2931

3032

3133
MLP = get_model([None, 784])
32-
import pprint
3334
pprint.pprint(MLP.config)
3435

3536
## start training

examples/basic_tutorials/tutorial_mnist_mlp_static_2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import time
22
import numpy as np
33
import tensorflow as tf
4+
45
import tensorlayer as tl
56
from tensorlayer.layers import Dense, Dropout, Input
67
from tensorlayer.models import Model

examples/basic_tutorials/tutorial_mnist_siamese.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
import time
1515

1616
import numpy as np
17-
1817
import tensorflow as tf
18+
1919
import tensorlayer as tl
2020
from tensorlayer.layers import Dense, Dropout, Flatten, Input
2121
from tensorlayer.models import Model

examples/basic_tutorials/tutorial_mnist_simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# -*- coding: utf-8 -*-
33

44
import numpy as np
5-
65
import tensorflow as tf
6+
77
import tensorlayer as tl
88

99
tl.logging.set_verbosity(tl.logging.DEBUG)

0 commit comments

Comments
 (0)