Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ To release a new version, please update the changelog as followed:
- Update pytest from 3.5.1 to 3.6.0 (by @DEKHTIARJonathan and @pyup-bot in #647)
- Update progressbar2 from 3.37.1 to 3.38.0 (by @DEKHTIARJonathan and @pyup-bot in #651)
- Update scikit-image from 0.13.1 to 0.14.0 (by @DEKHTIARJonathan and @pyup-bot in #656)
- Update keras from 2.1.6 to 2.2.0 (by @DEKHTIARJonathan and @pyup-bot in #684)

### Contributors
@lgarithm @DEKHTIARJonathan @2wins @One-sixth @zsdonghao @luomai
Expand All @@ -178,6 +179,7 @@ To release a new version, please update the changelog as followed:
- CircleCI added to build and upload Docker Containers for each PR merged and tag release (by @DEKHTIARJonathan in #648)
- Decorator:
- `tl.decorators` API created including `deprecated_alias` and `private_method` (by @DEKHTIARJonathan in #660)
- `tl.decorators` API enriched with `protected_method` (by @DEKHTIARJonathan in #675)
- Docker:
- Containers for each release and for each PR merged on master built (by @DEKHTIARJonathan in #648)
- Containers built in the following configurations (by @DEKHTIARJonathan in #648):
Expand All @@ -186,11 +188,13 @@ 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)
- Layer:
- ElementwiseLambdaLayer added to use custom function to connect multiple layer inputs (by @One-sixth in #579)
- AtrousDeConv2dLayer added (by @2wins in #662)
- Optimizer:
- AMSGrad Optimizer added based on `On the Convergence of Adam and Beyond (ICLR 2018)` (by @DEKHTIARJonathan in #636)
- Setup:
Expand Down Expand Up @@ -223,33 +227,41 @@ To release a new version, please update the changelog as followed:
- All the tests are now using a DEBUG level verbosity when run individualy (by @DEKHTIARJonathan in #660)
- `tf.identity` as activation is **ignored**, thus reducing the size of the graph by removing useless operation (by @DEKHTIARJonathan in #667)
- argument dictionaries are now checked and saved within the `Layer` Base Class (by @DEKHTIARJonathan in #667)
- `unstack_layer` function transformed into Class `UnStackLayer` (by @DEKHTIARJonathan in #683)
- `Layer` Base Class now presenting methods to update faultlessly `all_layers`, `all_params`, and `all_drop` (by @DEKHTIARJonathan in #675)
- Input Layers have been removed from `tl.layers.core` and added to `tl.layers.inputs` (by @DEKHTIARJonathan in #675)
- Input Layers are now considered as true layers in the graph (they represent a placeholder), unittests have been updated (by @DEKHTIARJonathan in #675)
- Layer API is simplified, with automatic feeding `prev_layer` into `self.inputs` (by @DEKHTIARJonathan in #675)

### Deprecated
- `tl.layers.TimeDistributedLayer` argurment `args` is deprecated in favor of `layer_args` (by @DEKHTIARJonathan in #667)

### Removed
- `assert()` calls remove and replaced by `raise AssertionError()` (by @DEKHTIARJonathan in #667)
- `tl.identity` is removed, not used anymore and deprecated for a long time (by @DEKHTIARJonathan in #667)
- All Code specific to `TF.__version__ < "1.6"` have been removed (by @DEKHTIARJonathan in #675)

### Fixed
- Issue #498 - Deprecation Warning Fix in `tl.layers.RNNLayer` with `inspect` (by @DEKHTIARJonathan in #574)
- Issue #498 - Deprecation Warning Fix in `tl.files` with truth value of an empty array is ambiguous (by @DEKHTIARJonathan in #575)
- Issue #565 related to `tl.utils.predict` fixed - `np.hstack` problem in which the results for multiple batches are stacked along `axis=1` (by @2wins in #566)
- Issue #572 with `tl.layers.DeformableConv2d` fixed (by @DEKHTIARJonathan in #573)
- Issue #664 with `tl.layers.ConvLSTMLayer` fixed (by @dengyueyun666 in #676)
- Typo of the document of ElementwiseLambdaLayer (by @zsdonghao in #588)
- Error in `tl.layers.TernaryConv2d` fixed - self.inputs not defined (by @DEKHTIARJonathan in #658)
- Deprecation warning fixed in `tl.layers.binary._compute_threshold()` (by @DEKHTIARJonathan in #658)
- All references to `tf.logging` replaced by `tl.logging` (by @DEKHTIARJonathan in #661)
- Duplicated code removed when bias was used (by @DEKHTIARJonathan in #667)
- `tensorlayer.third_party.roi_pooling.roi_pooling.roi_pooling_ops` is now lazy loaded to prevent systematic error raised (by @DEKHTIARJonathan in #675)
- Tutorial:
- `tutorial_word2vec_basic.py` saving issue #476 fixed (by @DEKHTIARJonathan in #635)
- All tutorials tested and errors have been fixed (by @DEKHTIARJonathan in #635)
### Security

### Dependencies Update
- Update pytest from 3.5.1 to 3.6.0 (by @DEKHTIARJonathan and @pyup-bot in #647)
- Update progressbar2 from 3.37.1 to 3.38.0 (by @DEKHTIARJonathan and @pyup-bot in #651)
- Update scikit-image from 0.13.1 to 0.14.0 (by @DEKHTIARJonathan and @pyup-bot in #656)
- Update keras from 2.1.6 to 2.2.0 (by @DEKHTIARJonathan and @pyup-bot in #684)

### Contributors
@lgarithm @DEKHTIARJonathan @2wins @One-sixth @zsdonghao @luomai
Expand Down Expand Up @@ -294,5 +306,5 @@ To release a new version, please update the changelog as followed:
@zsdonghao @luomai @DEKHTIARJonathan

[Unreleased]: https://github.com/tensorlayer/tensorlayer/compare/1.8.5...master
[1.8.6]: https://github.com/tensorlayer/tensorlayer/compare/1.8.6rc3...1.8.5
[1.8.6]: https://github.com/tensorlayer/tensorlayer/compare/1.8.6rc4...1.8.5
[1.8.5]: https://github.com/tensorlayer/tensorlayer/compare/1.8.4...1.8.5
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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.8.6rc3...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.8.6rc4...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)

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
:target: https://pypi.org/project/tensorlayer/

.. 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.8.6rc3...master
:target: https://github.com/tensorlayer/tensorlayer/compare/1.8.6rc4...master

.. image:: http://ec2-35-178-47-120.eu-west-2.compute.amazonaws.com/pypi/pyversions/tensorlayer.svg
:target: https://pypi.org/project/tensorlayer/
Expand Down
2 changes: 1 addition & 1 deletion example/tutorial_frozenlake_dqn.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@ def to_one_hot(i, n_classes=None):

## Note that, the rewards here with random action
running_reward = rAll if running_reward is None else running_reward * 0.99 + rAll * 0.01
print("Episode [%d/%d] sum reward:%f running reward:%f took:%.5fs %s" % \
print("Episode [%d/%d] sum reward: %f running reward: %f took: %.5fs %s" % \
(i, num_episodes, rAll, running_reward, time.time() - episode_time, '' if rAll == 0 else ' !!!!!!!!'))
2 changes: 1 addition & 1 deletion example/tutorial_frozenlake_q_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
break
rList.append(rAll)
running_reward = r if running_reward is None else running_reward * 0.99 + r * 0.01
print("Episode [%d/%d] sum reward:%f running reward:%f took:%.5fs %s" % \
print("Episode [%d/%d] sum reward: %f running reward: %f took: %.5fs %s" % \
(i, num_episodes, rAll, running_reward, time.time() - episode_time, '' if rAll == 0 else ' !!!!!!!!'))

print("Final Q-Table Values:/n %s" % Q)
2 changes: 1 addition & 1 deletion example/tutorial_word2vec_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def main_word2vec_basic():
if step % print_freq == 0:
if step > 0:
average_loss /= print_freq
print("Average loss at step %d/%d. loss:%f took:%fs" % \
print("Average loss at step %d/%d. loss: %f took: %fs" % \
(step, num_steps, average_loss, time.time() - start_time))
average_loss = 0
# Prints out nearby words given a list of words.
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keras>=2.1,<2.2
keras>=2.2,<2.3
pycodestyle>=2.4,<2.5
pydocstyle>=2.1,<2.2
pytest>=3.6,<3.7
Expand Down
2 changes: 1 addition & 1 deletion tensorlayer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
global_dict = {}

# Use the following formating: (major, minor, patch, prerelease)
VERSION = (1, 8, 6, "rc3")
VERSION = (1, 8, 6, "rc4")
__shortversion__ = '.'.join(map(str, VERSION[:3]))
__version__ = '.'.join(map(str, VERSION[:3])) + "".join(VERSION[3:])

Expand Down
4 changes: 2 additions & 2 deletions tensorlayer/cli/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ def main(args):
print('Using program %s with args %s' % (args.file, ' '.join(args.args)))
print('Using %d workers, %d parameter servers, %d GPUs.' % (num_workers, args.num_pss, len(GPU_IDS)))
cluster_spec = {
'ps': ['localhost:%d' % (PORT_BASE + i) for i in range(args.num_pss)],
'worker': ['localhost:%d' % (PORT_BASE + args.num_pss + i) for i in range(num_workers)]
'ps': ['localhost: %d' % (PORT_BASE + i) for i in range(args.num_pss)],
'worker': ['localhost: %d' % (PORT_BASE + args.num_pss + i) for i in range(num_workers)]
}
processes = list(create_tf_jobs(cluster_spec, args.file, args.args))
try:
Expand Down
2 changes: 1 addition & 1 deletion tensorlayer/files/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def load_cropped_svhn(path='data', include_extra=True):
logging.info(" added n_extra {} to n_train {} took {}s".format(len(y_extra), len(y_train), time.time() - t))
else:
logging.info(" no extra images are included")
logging.info(" image size:%s n_train:%d n_test:%d" % (str(X_train.shape[1:4]), len(y_train), len(y_test)))
logging.info(" image size: %s n_train: %d n_test: %d" % (str(X_train.shape[1:4]), len(y_train), len(y_test)))
logging.info(" took: {}s".format(int(time.time() - start_time)))
return X_train, y_train, X_test, y_test

Expand Down
18 changes: 9 additions & 9 deletions tensorlayer/layers/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def __init__(
).__init__(prev_layer=prev_layer, act=act, W_init_args=W_init_args, b_init_args=b_init_args, name=name)
logging.info(
"BinaryDenseLayer %s: %d %s" %
(self.name, n_units, self.act.__name__ if self.act is not None else '- No Activation')
(self.name, n_units, self.act.__name__ if self.act is not None else 'No Activation')
)

if self.inputs.get_shape().ndims != 2:
Expand Down Expand Up @@ -279,9 +279,9 @@ def __init__(
).__init__(prev_layer=prev_layer, act=act, W_init_args=W_init_args, b_init_args=b_init_args, name=name)

logging.info(
"BinaryConv2d %s: n_filter:%d filter_size:%s strides:%s pad:%s act:%s" % (
"BinaryConv2d %s: n_filter: %d filter_size: %s strides: %s pad: %s act: %s" % (
self.name, n_filter, str(filter_size), str(strides), padding, self.act.__name__
if self.act is not None else '- No Activation'
if self.act is not None else 'No Activation'
)
)

Expand Down Expand Up @@ -378,7 +378,7 @@ def __init__(

logging.info(
"TernaryDenseLayer %s: %d %s" %
(self.name, n_units, self.act.__name__ if self.act is not None else '- No Activation')
(self.name, n_units, self.act.__name__ if self.act is not None else 'No Activation')
)

if self.inputs.get_shape().ndims != 2:
Expand Down Expand Up @@ -510,9 +510,9 @@ def __init__(
).__init__(prev_layer=prev_layer, act=act, W_init_args=W_init_args, b_init_args=b_init_args, name=name)

logging.info(
"TernaryConv2d %s: n_filter:%d filter_size:%s strides:%s pad:%s act:%s" % (
"TernaryConv2d %s: n_filter: %d filter_size: %s strides: %s pad: %s act: %s" % (
self.name, n_filter, str(filter_size), str(strides), padding, self.act.__name__
if self.act is not None else '- No Activation'
if self.act is not None else 'No Activation'
)
)

Expand Down Expand Up @@ -619,7 +619,7 @@ def __init__(

logging.info(
"DorefaDenseLayer %s: %d %s" %
(self.name, n_units, self.act.__name__ if self.act is not None else '- No Activation')
(self.name, n_units, self.act.__name__ if self.act is not None else 'No Activation')
)

if self.inputs.get_shape().ndims != 2:
Expand Down Expand Up @@ -756,9 +756,9 @@ def __init__(
).__init__(prev_layer=prev_layer, act=act, W_init_args=W_init_args, b_init_args=b_init_args, name=name)

logging.info(
"DorefaConv2d %s: n_filter:%d filter_size:%s strides:%s pad:%s act:%s" % (
"DorefaConv2d %s: n_filter: %d filter_size: %s strides: %s pad: %s act: %s" % (
self.name, n_filter, str(filter_size), str(strides), padding, self.act.__name__
if self.act is not None else '- No Activation'
if self.act is not None else 'No Activation'
)
)

Expand Down
Loading