Skip to content

Commit a322819

Browse files
authored
Merge branch 'master' into master
2 parents 73083fd + 408f1d6 commit a322819

File tree

8 files changed

+27
-85
lines changed

8 files changed

+27
-85
lines changed

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,3 @@ deploy:
117117
python: '3.6'
118118
condition: '$_TF_VERSION = 2.0.0a0'
119119
# condition: '$_TF_VERSION = 1.11.0'
120-

CHANGELOG.md

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

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

70-
## [Unreleased]
70+
## [2.0.1] - 2019-5-17
71+
72+
73+
A maintain release.
74+
75+
### Changed
76+
- remove `tl.layers.initialize_global_variables(sess)` (PR #931)
77+
- support `trainable_weights` (PR #966)
7178

7279
### Added
7380
- Layer
@@ -78,29 +85,28 @@ To release a new version, please update the changelog as followed:
7885
- change `tl.layers.core`, `tl.models.core` (PR #966)
7986
- change `weights` into `all_weights`, `trainable_weights`, `nontrainable_weights`
8087

88+
8189
### Dependencies Update
8290
- nltk>=3.3,<3.4 => nltk>=3.3,<3.5 (PR #892)
8391
- pytest>=3.6,<3.11 => pytest>=3.6,<4.1 (PR #889)
8492
- yapf>=0.22,<0.25 => yapf==0.25.0 (PR #896)
8593
- imageio==2.5.0 progressbar2==3.39.3 scikit-learn==0.21.0 scikit-image==0.15.0 scipy==1.2.1 wrapt==1.11.1 pymongo==3.8.0 sphinx==2.0.1 wrapt==1.11.1 opencv-python==4.1.0.25 requests==2.21.0 tqdm==4.31.1 lxml==4.3.3 pycodestyle==2.5.0 sphinx==2.0.1 yapf==0.27.0(PR #967)
8694

87-
### Deprecated
88-
8995
### Fixed
9096
- fix docs of models @zsdonghao #957
9197
- In `BatchNorm`, keep dimensions of mean and variance to suit `channels first` (PR #963)
9298

93-
94-
### Removed
95-
96-
### Security
97-
9899
### Contributors
100+
- @warshallrho: #PR966
99101
- @zsdonghao: #931
100102
- @yd-yin: #963
103+
- @dvklopfenstein: #971
104+
101105

102106

103-
## [2.0.0-alpha] - 2019-05-04
107+
## [2.0.0] - 2019-05-04
108+
109+
To many PR for this update, please check [here](https://github.com/tensorlayer/tensorlayer/releases/tag/2.0.0) for more details.
104110

105111
### Changed
106112
* update for TensorLayer 2.0.0 alpha version (PR #952)
@@ -119,6 +125,7 @@ To release a new version, please update the changelog as followed:
119125
- @ChrisWu1997
120126
- @warshallrho
121127

128+
122129
## [1.11.1] - 2018-11-15
123130

124131
### Changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ and fine-tune. On the contrary, TensorLayer APIs are generally lightweight, flex
6262
Users often find it easy to start with the examples and tutorials, and then dive
6363
into TensorFlow seamlessly. In addition, TensorLayer does not create library lock-in through native supports for importing components from Keras.
6464

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

docs/user/contributing.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Contributing
66

77
TensorLayer is a major ongoing research project in Data Science Institute, Imperial College London.
88
The goal of the project is to develop a compositional language while complex learning systems
9-
can be build through composition of neural network modules.
9+
can be built through composition of neural network modules.
1010

1111
Numerous contributors come from various horizons such as: Tsinghua University, Carnegie Mellon University, University of Technology of Compiegne,
1212
Google, Microsoft, Bloomberg and etc.
@@ -51,7 +51,7 @@ What to contribute
5151
Your method and example
5252
~~~~~~~~~~~~~~~~~~~~~~~~~~~
5353

54-
If you have a new method or example in term of Deep learning and Reinforcement learning,
54+
If you have a new method or example in terms of Deep learning and Reinforcement learning,
5555
you are welcome to contribute.
5656

5757
* Provide your layer or example, so everyone can use it.

docs/user/faq.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ and `Wechat group <https://github.com/shorxp/tensorlayer-chinese/blob/master/doc
2020

2121
Beginner
2222
-----------
23-
For people who new to deep learning, the contirbutors provided a number of tutorials in this website, these tutorials will guide you to understand autoencoder, convolutional neural network, recurrent neural network, word embedding and deep reinforcement learning and etc. If your already understand the basic of deep learning, we recommend you to skip the tutorials and read the example codes on `Github <https://github.com/tensorlayer/tensorlayer>`__ , then implement an example from scratch.
23+
For people who new to deep learning, the contributors provided a number of tutorials in this website, these tutorials will guide you to understand autoencoder, convolutional neural network, recurrent neural network, word embedding and deep reinforcement learning and etc. If your already understand the basic of deep learning, we recommend you to skip the tutorials and read the example codes on `Github <https://github.com/tensorlayer/tensorlayer>`__ , then implement an example from scratch.
2424

2525
Engineer
2626
------------
27-
For people from industry, the contirbutors provided mass format-consistent examples covering computer vision, natural language processing and reinforcement learning. Besides, there are also many TensorFlow users already implemented product-level examples including image captioning, semantic/instance segmentation, machine translation, chatbot and etc, which can be found online.
27+
For people from industry, the contributors provided mass format-consistent examples covering computer vision, natural language processing and reinforcement learning. Besides, there are also many TensorFlow users already implemented product-level examples including image captioning, semantic/instance segmentation, machine translation, chatbot and etc., which can be found online.
2828
It is worth noting that a wrapper especially for computer vision `Tf-Slim <https://github.com/tensorflow/models/tree/master/slim#Pretrained>`__ can be connected with TensorLayer seamlessly.
2929
Therefore, you may able to find the examples that can be used in your project.
3030

3131
Researcher
3232
-------------
33-
For people from academic, TensorLayer was originally developed by PhD students who facing issues with other libraries on implement novel algorithm. Installing TensorLayer in editable mode is recommended, so you can extend your methods in TensorLayer.
34-
For researches related to image such as image captioning, visual QA and etc, you may find it is very helpful to use the existing `Tf-Slim pre-trained models <https://github.com/tensorflow/models/tree/master/slim#Pretrained>`__ with TensorLayer (a specially layer for connecting Tf-Slim is provided).
33+
For people from academia, TensorLayer was originally developed by PhD students who facing issues with other libraries on implement novel algorithm. Installing TensorLayer in editable mode is recommended, so you can extend your methods in TensorLayer.
34+
For research related to image processing such as image captioning, visual QA and etc., you may find it is very helpful to use the existing `Tf-Slim pre-trained models <https://github.com/tensorflow/models/tree/master/slim#Pretrained>`__ with TensorLayer (a specially layer for connecting Tf-Slim is provided).
3535

3636

3737
Exclude some layers from training
@@ -48,7 +48,7 @@ To choose which variables to update, you can do as below.
4848
4949
train_params = network.trainable_weights[3:]
5050
51-
The second way is to get the variables by a given name. For example, if you want to get all variables which the layer name contain ``dense``, you can do as below.
51+
The second way is to get the variables by a given name. For example, if you want to get all variables which the layer name contains ``dense``, you can do as below.
5252

5353
.. code-block:: python
5454
@@ -76,13 +76,13 @@ Visualization
7676
Cannot Save Image
7777
-----------------------
7878

79-
If you run the script via SSH control, sometime you may find the following error.
79+
If you run the script via SSH control, sometimes you may find the following error.
8080

8181
.. code-block:: bash
8282
8383
_tkinter.TclError: no display name and no $DISPLAY environment variable
8484
85-
If happen, run ``sudo apt-get install python3-tk`` or ``import matplotlib`` and ``matplotlib.use('Agg')`` before ``import tensorlayer as tl``.
85+
If this happens, run ``sudo apt-get install python3-tk`` or ``import matplotlib`` and ``matplotlib.use('Agg')`` before ``import tensorlayer as tl``.
8686
Alternatively, add the following code into the top of ``visualize.py`` or in your own code.
8787

8888
.. code-block:: python

examples/basic_tutorials/README.md

-43
Original file line numberDiff line numberDiff line change
@@ -1,44 +1 @@
1-
Something you need to know:
21

3-
### 1. Static and dynamic model
4-
5-
1) `tutorial_mnist_mlp_static.py`: static model
6-
7-
2) `tutorial_mnist_mlp_dynamic.py`: dynamic model
8-
9-
### 2. Switching Training and testing
10-
11-
There are two ways to switch the training and testing mode:
12-
13-
1 ) use Pytorch-like method, turn on and off the training/evaluation as follow:
14-
15-
```python
16-
model.train() # enable dropout, batch norm decay and etc
17-
y1 = model(x)
18-
model.eval() # disable dropout, fix batch norm weights and etc
19-
y2 = model(x)
20-
```
21-
22-
2) use TensorLayer 1.x method, input `is_train` to the model while inferencing.
23-
24-
```python
25-
y1 = model(x, is_train=True)
26-
y2 = model(x, is_train=False)
27-
```
28-
29-
30-
31-
### Data augmentation
32-
33-
- Data augmentation is essential for training, while if the augmentation is complex, it will slow down the training.
34-
We used CIFAR10 classification as example of data augmentation.
35-
- For the best performance, please use `tutorial_cifar10_datasetapi.py`.
36-
- It is suggested to use TensorFlow's DataSet API (`tf.data` and `tf.image`) and TFRecord for the sake of performance and generalibity.
37-
- For TFRecord and Dataset API,
38-
TFRecord needs to first store all data into TFRecord format, while Dataset API is simpler that can directly use data XXXX.
39-
40-
### Float16
41-
- For Float16, some GPUs can speed up but some cannot.
42-
43-
### Others
44-
- For distributed training

tensorlayer/initializers.py

-21
Original file line numberDiff line numberDiff line change
@@ -192,27 +192,6 @@ def deconv2d_bilinear_upsampling_initializer(shape):
192192
A constant initializer with weights set to correspond to per channel bilinear upsampling
193193
when passed as W_int in DeConv2dLayer
194194
195-
Examples
196-
--------
197-
Upsampling by a factor of 2, ie e.g 100->200
198-
>>> import tensorflow as tf
199-
>>> import tensorlayer as tl
200-
>>> rescale_factor = 2
201-
>>> imsize = 128
202-
>>> num_channels = 3
203-
>>> num_in_channels = 3
204-
>>> num_out_channels = 3
205-
>>> filter_shape = (5, 5, num_out_channels, num_in_channels)
206-
>>> ni = tl.layers.Input(shape=(1, imsize, imsize, num_channels))
207-
>>> bilinear_init = deconv2d_bilinear_upsampling_initializer(shape=filter_shape)
208-
>>> net = tl.layers.DeConv2dLayer(
209-
... shape=filter_shape,
210-
... outputs_shape=(1, imsize*rescale_factor, imsize*rescale_factor, num_out_channels),
211-
... strides=(1, rescale_factor, rescale_factor, 1),
212-
... W_init=bilinear_init,
213-
... padding='SAME',
214-
... act=None, name='g/h1/decon2d')(ni)
215-
216195
"""
217196
if shape[0] != shape[1]:
218197
raise Exception('deconv2d_bilinear_upsampling_initializer only supports symmetrical filter sizes')

tensorlayer/package_info.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
MAJOR = 2
66
MINOR = 0
7-
PATCH = 0
7+
PATCH = 1
88
PRE_RELEASE = ''
99
# Use the following formatting: (major, minor, patch, prerelease)
1010
VERSION = (MAJOR, MINOR, PATCH, PRE_RELEASE)

0 commit comments

Comments
 (0)