diff --git a/.gitignore b/.gitignore index 332cf9aeb..3ebfd1dba 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,7 @@ instance/ # Sphinx documentation docs/_build/ docs/test_build/ +docs/build_test/ # PyBuilder target/ @@ -94,6 +95,8 @@ venv.bak/ venv_/ venv2/ venv3/ +venv_doc/ +venv_py2/ # Spyder project settings .spyderproject @@ -125,6 +128,4 @@ update_tl.py # Data Files and ByteCode files *.gz -*.npz -venv_doc/ -venv_py2/ +*.npz \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 01e785c54..b339854de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ branches: only: - master - TensorLayer-1.x - - /\d+\.\d+(\.\d+)?(\S*)?$/ + - /^\d+\.\d+(\.\d+)?(\S*)?$/ python: - "3.6" diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fdca76f3..1be0e35ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,15 +47,15 @@ To release a new version, please update the changelog as followed: ### Changed -### Deprecated +### Dependencies Update -### Removed +### Deprecated ### Fixed -### Security +### Removed -### Dependencies Update +### Security ### Contributors @@ -70,19 +70,34 @@ To release a new version, please update the changelog as followed: ## [Unreleased] ### Added -- unittest `tests\test_timeout.py` has been added to ensure the network creation process does not freeze. ### Changed - - remove 'tensorboard' param, replaced by 'tensorboard_dir' in `tensorlayer/utils.py` with customizable tensorboard directory (PR #819) + +### Dependencies Update ### Deprecated +### Fixed + +### Removed + +### Security + +### Contributors + +## [1.10.1] - 2018-09-07 + +### Added +- unittest `tests\test_timeout.py` has been added to ensure the network creation process does not freeze. + +### Changed + - remove 'tensorboard' param, replaced by 'tensorboard_dir' in `tensorlayer/utils.py` with customizable tensorboard directory (PR #819) + ### Removed - TL Graph API removed. Memory Leaks Issues with this API, will be fixed and integrated in TL 2.0 (PR #818) ### Fixed - -### Security +- Issue #817 fixed: TL 1.10.0 - Memory Leaks and very slow network creation. ### Dependencies Update - autopep8>=1.3,<1.4 => autopep8>=1.3,<1.5 (PR #815) @@ -359,7 +374,8 @@ To release a new version, please update the changelog as followed: @zsdonghao @luomai @DEKHTIARJonathan -[Unreleased]: https://github.com/tensorlayer/tensorlayer/compare/1.10.0...master +[Unreleased]: https://github.com/tensorlayer/tensorlayer/compare/1.10.1...master +[1.10.1]: https://github.com/tensorlayer/tensorlayer/compare/1.10.0...1.10.1 [1.10.0]: https://github.com/tensorlayer/tensorlayer/compare/1.9.1...1.10.0 [1.9.1]: https://github.com/tensorlayer/tensorlayer/compare/1.9.0...1.9.1 [1.9.0]: https://github.com/tensorlayer/tensorlayer/compare/1.8.5...1.9.0 diff --git a/README.md b/README.md index 5edf13a24..2edf8eae9 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ![PyPI Stable Version](http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/github/release/tensorlayer/tensorlayer.svg?label=PyPI%20-%20Release) ![PyPI RC Version](http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/github/release/tensorlayer/tensorlayer/all.svg?label=PyPI%20-%20Pre-Release) -[![Github commits (since latest release)](http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/github/commits-since/tensorlayer/tensorlayer/latest.svg)](https://github.com/tensorlayer/tensorlayer/compare/1.9.0...master) +[![Github commits (since latest release)](http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/github/commits-since/tensorlayer/tensorlayer/latest.svg)](https://github.com/tensorlayer/tensorlayer/compare/1.10.1...master) [![PyPI - Python Version](http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/pypi/pyversions/tensorlayer.svg)](https://pypi.org/project/tensorlayer/) [![Supported TF Version](http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/badge/tensorflow-1.6.0+-blue.svg)](https://github.com/tensorflow/tensorflow/releases) @@ -23,7 +23,7 @@ [![Documentation Status](http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/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](http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/docker/pulls/tensorlayer/tensorlayer.svg?maxAge=604800)](https://hub.docker.com/r/tensorlayer/tensorlayer/) -[![Codacy Badge](http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/codacy/grade/ca2a29ddcf7445588beff50bee5406d9.svg)](https://app.codacy.com/app/tensorlayer/tensorlayer) +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d6b118784e25435498e7310745adb848)](https://www.codacy.com/app/tensorlayer/tensorlayer)
diff --git a/README.rst b/README.rst index 2a473c278..5c822a014 100644 --- a/README.rst +++ b/README.rst @@ -178,7 +178,7 @@ TensorLayer is released under the Apache 2.0 license. .. |PyPI-Prerelease| image:: http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/github/release/tensorlayer/tensorlayer/all.svg?label=PyPI%20-%20Pre-Release :target: https://pypi.org/project/tensorlayer/ .. |Commits-Since| image:: http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/github/commits-since/tensorlayer/tensorlayer/latest.svg - :target: https://github.com/tensorlayer/tensorlayer/compare/1.9.0...master + :target: https://github.com/tensorlayer/tensorlayer/compare/1.10.1...master .. |Python| image:: http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/pypi/pyversions/tensorlayer.svg :target: https://pypi.org/project/tensorlayer/ .. |TensorFlow| image:: https://img.shields.io/badge/tensorflow-1.6.0+-blue.svg @@ -196,5 +196,5 @@ TensorLayer is released under the Apache 2.0 license. :target: https://pyup.io/repos/github/tensorlayer/tensorlayer/ .. |Docker-Pulls| image:: http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/docker/pulls/tensorlayer/tensorlayer.svg :target: https://hub.docker.com/r/tensorlayer/tensorlayer/ -.. |Code-Quality| image:: http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/codacy/grade/ca2a29ddcf7445588beff50bee5406d9.svg - :target: https://app.codacy.com/app/tensorlayer/tensorlayer +.. |Code-Quality| image:: https://api.codacy.com/project/badge/Grade/d6b118784e25435498e7310745adb848 + :target: https://www.codacy.com/app/tensorlayer/tensorlayer diff --git a/tensorlayer/layers/convolution/simplified_conv.py b/tensorlayer/layers/convolution/simplified_conv.py index 7581c5fc4..4275f7bb2 100644 --- a/tensorlayer/layers/convolution/simplified_conv.py +++ b/tensorlayer/layers/convolution/simplified_conv.py @@ -36,7 +36,7 @@ class Conv1d(Layer): padding : str The padding algorithm type: "SAME" or "VALID". data_format : str - Default is 'NWC' as it is a 1D CNN. + channels_last 'NWC' (default) or channels_first. W_init : initializer The initializer for the weight matrix. b_init : initializer or None @@ -117,6 +117,8 @@ class Conv2d(Layer): The activation function of this layer. padding : str The padding algorithm type: "SAME" or "VALID". + data_format : str + "channels_last" (NHWC, default) or "channels_first" (NCHW). W_init : initializer The initializer for the the weight matrix. b_init : initializer or None @@ -127,8 +129,6 @@ class Conv2d(Layer): The arguments for the bias vector initializer (for TF < 1.5). use_cudnn_on_gpu : bool Default is False (for TF < 1.5). - data_format : str - "NHWC" or "NCHW", default is "NHWC" (for TF < 1.5). name : str A unique layer name. @@ -159,13 +159,13 @@ def __init__( strides=(1, 1), act=None, padding='SAME', + data_format='channels_last', dilation_rate=(1, 1), W_init=tf.truncated_normal_initializer(stddev=0.02), b_init=tf.constant_initializer(value=0.0), W_init_args=None, b_init_args=None, use_cudnn_on_gpu=None, - data_format=None, name='conv2d', ): # if len(strides) != 2: @@ -194,7 +194,7 @@ def __init__( kernel_size=filter_size, strides=strides, padding=padding, - data_format='channels_last', + data_format=data_format, dilation_rate=dilation_rate, activation=self.act, use_bias=(False if b_init is None else True), diff --git a/tensorlayer/layers/convolution/simplified_deconv.py b/tensorlayer/layers/convolution/simplified_deconv.py index 54437aead..2225c9ae8 100644 --- a/tensorlayer/layers/convolution/simplified_deconv.py +++ b/tensorlayer/layers/convolution/simplified_deconv.py @@ -35,11 +35,10 @@ class DeConv2d(Layer): The stride step (height, width). padding : str The padding algorithm type: "SAME" or "VALID". - batch_size : int or None - Require if TF < 1.3, int or None. - If None, try to find the `batch_size` from the first dim of net.outputs (you should define the `batch_size` in the input placeholder). act : activation function The activation function of this layer. + data_format : str + "channels_last" (NHWC, default) or "channels_first" (NCHW). W_init : initializer The initializer for the weight matrix. b_init : initializer or None @@ -61,11 +60,12 @@ def __init__( prev_layer, n_filter=32, filter_size=(3, 3), - out_size=(30, 30), # remove + # out_size=(30, 30), # remove strides=(2, 2), padding='SAME', - batch_size=None, # remove + # batch_size=None, # remove act=None, + data_format='channels_last', W_init=tf.truncated_normal_initializer(stddev=0.02), b_init=tf.constant_initializer(value=0.0), W_init_args=None, # TODO: Remove when TF <1.3 not supported @@ -86,8 +86,8 @@ def __init__( raise ValueError("len(strides) should be 2, DeConv2d and DeConv2dLayer are different.") conv2d_transpose = tf.layers.Conv2DTranspose( - filters=n_filter, kernel_size=filter_size, strides=strides, padding=padding, activation=self.act, - kernel_initializer=W_init, bias_initializer=b_init, name=name + filters=n_filter, kernel_size=filter_size, strides=strides, padding=padding, data_format=data_format, + activation=self.act, kernel_initializer=W_init, bias_initializer=b_init, name=name ) self.outputs = conv2d_transpose(self.inputs) @@ -116,6 +116,8 @@ class DeConv3d(Layer): The padding algorithm type: "SAME" or "VALID". act : activation function The activation function of this layer. + data_format : str + "channels_last" (NDHWC, default) or "channels_first" (NCDHW). W_init : initializer The initializer for the weight matrix. b_init : initializer or None @@ -138,6 +140,7 @@ def __init__( strides=(2, 2, 2), padding='SAME', act=None, + data_format='channels_last', W_init=tf.truncated_normal_initializer(stddev=0.02), b_init=tf.constant_initializer(value=0.0), W_init_args=None, # TODO: Remove when TF <1.3 not supported @@ -157,7 +160,7 @@ def __init__( # with tf.variable_scope(name) as vs: nn = tf.layers.Conv3DTranspose( filters=n_filter, kernel_size=filter_size, strides=strides, padding=padding, activation=self.act, - kernel_initializer=W_init, bias_initializer=b_init, name=name + data_format=data_format, kernel_initializer=W_init, bias_initializer=b_init, name=name ) self.outputs = nn(self.inputs) diff --git a/tensorlayer/package_info.py b/tensorlayer/package_info.py index eb1370444..50c471c6d 100644 --- a/tensorlayer/package_info.py +++ b/tensorlayer/package_info.py @@ -3,7 +3,7 @@ """Deep learning and Reinforcement learning library for Researchers and Engineers""" # Use the following formatting: (major, minor, patch, prerelease) -VERSION = (1, 10, 1, "rc0") +VERSION = (1, 10, 1, "") __shortversion__ = '.'.join(map(str, VERSION[:3])) __version__ = '.'.join(map(str, VERSION[:3])) + "".join(VERSION[3:])