Skip to content

Commit 995a902

Browse files
committed
merge rl branch with master
2 parents c3643c6 + 76c07a1 commit 995a902

File tree

136 files changed

+2170
-2186
lines changed

Some content is hidden

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

136 files changed

+2170
-2186
lines changed

CHANGELOG.md

+33-12
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ To release a new version, please update the changelog as followed:
6767

6868
<!-- YOU CAN EDIT FROM HERE -->
6969

70-
7170
## [Unreleased]
7271

7372
### Added
@@ -80,17 +79,38 @@ To release a new version, please update the changelog as followed:
8079

8180
### Fixed
8281

83-
- Fix README. (#PR 1044)
84-
- Fix package info. (#PR 1046)
85-
8682
### Removed
8783

8884
### Security
8985

9086
### Contributors
9187

92-
- @luomai (PR #1044, 1046)
88+
## [2.2.1] - 2020-01-14
89+
90+
TensorLayer 2.2.1 is a maintenance release.
91+
It contains numerous bug fixes.
92+
93+
### Added
94+
95+
### Changed
96+
97+
### Dependencies Update
98+
99+
### Deprecated
100+
101+
### Fixed
102+
103+
- Fix README. (#1044)
104+
- Fix package info. (#1046)
105+
- Fix build test (Using YAPF 0.29) (#1057)
106+
107+
### Removed
108+
109+
### Security
110+
111+
### Contributors
93112

113+
- @luomai (#1044, #1046, #1057)
94114

95115
## [2.2.0] - 2019-09-13
96116

@@ -150,7 +170,7 @@ This release is compatible with TensorFlow 2 RC1.
150170
- Replace tf.nn.func with tf.nn.func.\_\_name\_\_ in model config. (PR #994)
151171
- Add Reinforcement learning tutorials. (PR #995)
152172
- Add RNN layers with simple rnn cell, GRU cell, LSTM cell. (PR #998)
153-
- Update Seq2seq (#998)
173+
- Update Seq2seq (#998)
154174
- Add Seq2seqLuongAttention model (#998)
155175

156176
### Fixed
@@ -571,12 +591,13 @@ To many PR for this update, please check [here](https://github.com/tensorlayer/t
571591
@zsdonghao @luomai @DEKHTIARJonathan
572592

573593
[Unreleased]: https://github.com/tensorlayer/tensorlayer/compare/2.0....master
574-
[2.2.0]: https://github.com/tensorlayer/tensorlayer/compare/2.2.0...2.2.0
575-
[2.1.0]: https://github.com/tensorlayer/tensorlayer/compare/2.1.0...2.1.0
576-
[2.0.2]: https://github.com/tensorlayer/tensorlayer/compare/2.0.2...2.0.2
577-
[2.0.1]: https://github.com/tensorlayer/tensorlayer/compare/2.0.1...2.0.1
578-
[2.0.0]: https://github.com/tensorlayer/tensorlayer/compare/2.0.0...2.0.0
579-
[1.11.1]: https://github.com/tensorlayer/tensorlayer/compare/1.11.0...1.11.0
594+
[2.2.1]: https://github.com/tensorlayer/tensorlayer/compare/2.2.0...2.2.1
595+
[2.2.0]: https://github.com/tensorlayer/tensorlayer/compare/2.1.0...2.2.0
596+
[2.1.0]: https://github.com/tensorlayer/tensorlayer/compare/2.0.2...2.1.0
597+
[2.0.2]: https://github.com/tensorlayer/tensorlayer/compare/2.0.1...2.0.2
598+
[2.0.1]: https://github.com/tensorlayer/tensorlayer/compare/2.0.0...2.0.1
599+
[2.0.0]: https://github.com/tensorlayer/tensorlayer/compare/1.11.1...2.0.0
600+
[1.11.1]: https://github.com/tensorlayer/tensorlayer/compare/1.11.0...1.11.1
580601
[1.11.0]: https://github.com/tensorlayer/tensorlayer/compare/1.10.1...1.11.0
581602
[1.10.1]: https://github.com/tensorlayer/tensorlayer/compare/1.10.0...1.10.1
582603
[1.10.0]: https://github.com/tensorlayer/tensorlayer/compare/1.9.1...1.10.0

Makefile

+7-6
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@ test:
1414
python3 tests/files/test_utils_saveload.py
1515

1616
format:
17-
autoflake -i examples/*.py
18-
autoflake -i tensorlayer/*.py
19-
autoflake -i tensorlayer/**/*.py
17+
autoflake -ir examples
18+
autoflake -ir tensorlayer
19+
autoflake -ir tests
2020

2121
isort -rc examples
2222
isort -rc tensorlayer
23+
isort -rc tests
2324

24-
yapf -i examples/*.py
25-
yapf -i tensorlayer/*.py
26-
yapf -i tensorlayer/**/*.py
25+
yapf -ir examples
26+
yapf -ir tensorlayer
27+
yapf -ir tests
2728

2829
install3:
2930
pip3 install -U . --user

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ We suggest users to report bugs using Github issues. Users can also discuss how
158158

159159
<br/>
160160

161-
<a href="https://join.slack.com/t/tensorlayer/shared_invite/enQtMjUyMjczMzU2Njg4LWI0MWU0MDFkOWY2YjQ4YjVhMzI5M2VlZmE4YTNhNGY1NjZhMzUwMmQ2MTc0YWRjMjQzMjdjMTg2MWQ2ZWJhYzc" target="\_blank">
161+
<a href="https://join.slack.com/t/tensorlayer/shared_invite/enQtODk1NTQ5NTY1OTM5LTQyMGZhN2UzZDBhM2I3YjYzZDBkNGExYzcyZDNmOGQzNmYzNjc3ZjE3MzhiMjlkMmNiMmM3Nzc4ZDY2YmNkMTY" target="\_blank">
162162
<div align="center">
163163
<img src="img/join_slack.png" width="40%"/>
164164
</div>

docs/user/installation.rst

+11-9
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def _map_fn_train(img, target):
125125

126126
def _map_fn_test(img, target):
127127
# 1. Crop the central [height, width] of the image.
128-
img = tf.image.resize_with_crop_or_pad(img, 24, 24)
128+
img = tf.image.resize_with_pad(img, 24, 24)
129129
# 2. Subtract off the mean and divide by the variance of the pixels.
130130
img = tf.image.per_image_standardization(img)
131131
img = tf.reshape(img, (24, 24, 3))

examples/data_process/tutorial_fast_affine_transform.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
import multiprocessing
99
import time
1010

11-
import cv2
1211
import numpy as np
1312
import tensorflow as tf
1413

14+
import cv2
1515
import tensorlayer as tl
1616

1717
# tl.logging.set_verbosity(tl.logging.DEBUG)
@@ -98,7 +98,6 @@ def _map_fn(image_path, target):
9898
st = time.time()
9999
for img, target in dataset:
100100
n_step += 1
101-
pass
102101
assert n_step == n_epoch * n_data / batch_size
103102
print("dataset APIs took %fs for each image" % ((time.time() - st) / batch_size / n_step)) # CPU ~ 100%
104103

examples/data_process/tutorial_tfrecord3.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ def distort_image(image, thread_id):
231231

232232

233233
def prefetch_input_data(
234-
reader, file_pattern, is_training, batch_size, values_per_shard, input_queue_capacity_factor=16,
235-
num_reader_threads=1, shard_queue_name="filename_queue", value_queue_name="input_queue"
234+
reader, file_pattern, is_training, batch_size, values_per_shard, input_queue_capacity_factor=16,
235+
num_reader_threads=1, shard_queue_name="filename_queue", value_queue_name="input_queue"
236236
):
237237
"""Prefetches string values from disk into an input queue.
238238

0 commit comments

Comments
 (0)