Skip to content

[WIP] TensorLayer 2.0 #755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 456 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
456 commits
Select commit Hold shift + click to select a range
3621bae
BinaryConv2d args reorganised
Jul 31, 2018
9481c1e
Dorefa Conv2D refactored
Jul 31, 2018
1b5e537
Update CHANGELOG.md
luomai Jul 31, 2018
324c24b
Expert Conv Refactored
Jul 31, 2018
5ccdc0d
use CuDNN set default to True
Jul 31, 2018
d96b204
Expert Deconv Refactored
Jul 31, 2018
99ca2f6
Network Compile logging improved
Jul 31, 2018
f798d6a
Merge branch 'master' into model_api
Jul 31, 2018
18bb379
Merge branch 'master' into database
Jul 31, 2018
c9388d9
Requirements update
Jul 31, 2018
8ebf8ee
binary Conv name changed
Jul 31, 2018
d4e385d
GroupConv2d refactored
Jul 31, 2018
a302b7b
Quan renamed to Quantized
Jul 31, 2018
c214c1b
Various Cleaning
Jul 31, 2018
e8773db
Merge branch 'database' into model_api
Jul 31, 2018
540b7b9
yapf
zsdonghao Jul 31, 2018
0e2befd
Merge branch 'database' of github.com:tensorlayer/tensorlayer into da…
zsdonghao Jul 31, 2018
69f4d8a
use_gemm renamed to gemmlowp_at_inference
Jul 31, 2018
9f194e7
Bug fix with dtype != float32
Aug 1, 2018
0fdadb0
Test on output dtype performed
Aug 1, 2018
bf3ca9f
Test Network 2D cleaned
Aug 1, 2018
95f8440
example layer name renamed
Aug 1, 2018
a46419f
Quantized Conv2d refactored
Aug 1, 2018
a4968d9
Codebase cleaning
Aug 1, 2018
cccba2e
Merge branch 'database' into model_api
Aug 1, 2018
c8a6180
Quantized Conv2D with BN refactored
Aug 1, 2018
bbf7ab7
YAPF Cleaning
Aug 1, 2018
a79c9c9
Merge branch 'master' into database
zsdonghao Aug 1, 2018
952af71
Merge branch 'master' into database
zsdonghao Aug 2, 2018
fc9b6cf
Merge branch 'master' into model_api
Aug 2, 2018
2cd979b
Merge branch 'database' into model_api
Aug 2, 2018
0948260
Merge branch 'database' into model_api
Aug 2, 2018
75a38e3
Merge branch 'master' into model_api
zsdonghao Aug 2, 2018
e87fcc6
Merge branch 'master' into database
zsdonghao Aug 2, 2018
207ba89
Merge branch 'master' into database
zsdonghao Aug 3, 2018
afa7c1e
Merge branch 'master' into model_api
Aug 3, 2018
3cae38e
Merge branch 'database' into model_api
Aug 3, 2018
fee00b1
Merge branch 'master' into model_api
Aug 7, 2018
b3c6eeb
Merge branch 'master' into model_api
Aug 7, 2018
e0c912f
Merge branch 'master' into model_api
Aug 9, 2018
dc627b9
RTD with Mock Imports
Aug 13, 2018
b820b9d
Issue with Deprecated Decorator Fixed
Aug 14, 2018
47df746
Changelog updated + YAPF cleaning
Aug 14, 2018
b8c0a4e
Update .readthedocs.yml
Aug 14, 2018
c644258
TF 1.6.0 Errors fixed
Aug 14, 2018
7790c02
Merge branch 'documentation/mock_imports' of https://github.com/tenso…
Aug 14, 2018
d6fba96
YAPF Cleaning
Aug 14, 2018
2caa605
TL init if protected
Aug 14, 2018
8823f7b
Error fix - Test Documentation
Aug 14, 2018
e643c1f
Merge branch 'documentation/mock_imports' into model_api
Aug 14, 2018
2482880
Merge branch 'master' into model_api
Aug 14, 2018
ae9d9f7
Doc Building Improved
Aug 15, 2018
1f32132
Deprecated Decorator Uncommented
Aug 15, 2018
9bec4a1
Quan Layers documentation fixed
Aug 15, 2018
c517ec7
YAPF fixing
Aug 15, 2018
a2a8b8b
deprecation alias changed to version 2.0.0 + YAPF cleaning
Aug 15, 2018
bb304b5
Typo Fix + YAPF cleaning
Aug 15, 2018
8e1e95a
tl.layers.Conv1d and tl.layers.Conv2d refactored & tested
Aug 15, 2018
2635fa9
layers default name change from "cnn" to "conv"
Aug 15, 2018
a23f0d1
Typo Fix
Aug 15, 2018
7da903c
Deconv2d and Deconv3d refactored and tested
Aug 15, 2018
eb65505
SubPixelConv1d and SubPixelConv2d refactored and tested
Aug 15, 2018
b05cab6
pydoc style only runned once
Aug 15, 2018
d2d2a1e
BugFix with logging.temp_handler
Aug 15, 2018
19df709
YAPF Cleaning
Aug 15, 2018
0af9b16
ternary conv cleaned
Aug 15, 2018
2c474a5
Merge branch 'master' into model_api
Aug 15, 2018
41216bd
W renamed weight_matrix
Aug 15, 2018
24eb819
TernaryConv2D Layer Refactored and Tested
Aug 15, 2018
872de7a
SeparableConv1d and SeparableConv2d refactored and tested
Aug 15, 2018
cc412d0
padding enforced uppercase
Aug 15, 2018
c187f1b
Deconv now using automatic output_shape
Aug 15, 2018
88fd736
All Convolution Layers Refactored and working
Aug 15, 2018
2b7dba1
unittest error fix
Aug 15, 2018
127fe80
YAPF Cleaning
Aug 15, 2018
37f2ef0
CustomModel API added - Layer API Refactored
Aug 16, 2018
4d61ff7
test network 2d working
Aug 16, 2018
bed8364
YAPF Cleaning Applied
Aug 16, 2018
8db56ac
CustomNetwork API On Going
Aug 16, 2018
9ae0230
BugFix with prev_layer as list or tuple
Aug 16, 2018
009c8e9
Requirements Updated
Aug 16, 2018
48dcf0a
Quantum Keras Bug Solved
Aug 16, 2018
6a19ee5
Deprecated Argumented Decorator Added
Aug 17, 2018
e4479f0
YAPF Style Update
Aug 17, 2018
c31a835
YAPF Style Update
Aug 17, 2018
3f93ce3
YAPF updated
Aug 17, 2018
08a935b
YAPF Style Update
Aug 17, 2018
b336034
YAPF Style Update
Aug 17, 2018
fa5be26
YAPF Style Update
Aug 17, 2018
3ef47c7
YAPF Configuration Updated
Aug 17, 2018
52b2a11
`prev_layer` has been deprecated
Aug 17, 2018
5259318
Typo Fixed
Aug 17, 2018
44017db
TQDM Updated
Aug 20, 2018
d531706
Merge branch 'master' into model_api
Aug 21, 2018
acc36c6
CompiledNetwork add start
Aug 23, 2018
34fbf84
Dependency Update
Aug 23, 2018
1d6bdae
Merge branch 'dependency_update' into model_api
Aug 23, 2018
2fa3b7e
Merge branch 'master' into model_api
Aug 23, 2018
907be6e
Error modified
Aug 23, 2018
0e266b0
Merge branch 'master' into model_api
Aug 24, 2018
f4e67bb
Merge branch 'master' into model_api
Aug 24, 2018
7b156c5
Image Resampling, NoneType input dimension managed differently
Aug 24, 2018
d5e9209
Resampling Layers improved
Aug 24, 2018
088240e
Compiled Layer API Start
Aug 24, 2018
f1f3779
Layers refactoring on going
Aug 25, 2018
a9fc991
Refactoring functioning
Aug 25, 2018
248bf9a
out_shape renamed
Aug 25, 2018
4300dc9
YAPF Correction
Aug 25, 2018
f7b397c
YAPF Cleaning
Aug 25, 2018
128d883
Reorganization ongoing
Aug 25, 2018
e86827a
Changes on going
Aug 25, 2018
e143571
Pooling Layer Refactored
Aug 25, 2018
21daab3
Bug Fix local_weights
Aug 25, 2018
8cff2ef
network API : binary dense , dorefa dense, dropconnect dense
zsdonghao Aug 25, 2018
0d81727
Various renames, Refactoring and fixes
Aug 26, 2018
34533d9
Merge branch 'model_api_hao' into model_api
Aug 26, 2018
ca26356
Error Fix and prev_layer removed
Aug 26, 2018
96264d2
Cleaning and Bug Fixes
Aug 26, 2018
f888d59
YAPF Cleaning
Aug 26, 2018
221e6b6
Bug Fixing with Dimension and TF 1.9 vs TF 1.10
Aug 26, 2018
b1c9eee
YAPF cleaning
Aug 26, 2018
93889ce
quant
zsdonghao Aug 26, 2018
da0e0c6
tenery dense
zsdonghao Aug 26, 2018
c009876
unitest for binary dense
zsdonghao Aug 26, 2018
269ff48
update
zsdonghao Aug 26, 2018
0c05370
del multiplex | refactor pooling without testing
zsdonghao Aug 26, 2018
a9c1092
del multiplex | refactor pooling without testing
zsdonghao Aug 26, 2018
03d0a37
del reconlayer
zsdonghao Aug 27, 2018
16067ae
remove estimator layer
zsdonghao Aug 27, 2018
e3f101c
refactor RNNLayer
zsdonghao Aug 27, 2018
f3f3b35
refactor RNNLayer
zsdonghao Aug 27, 2018
83273d3
test success
zsdonghao Aug 27, 2018
8fb5de8
rm pre layer
zsdonghao Aug 27, 2018
b7e4f0d
Proof read & corrections - John
Aug 27, 2018
52b8ecc
test pooling 2d
zsdonghao Aug 27, 2018
456100f
Merge commit '269ff48093ebe099957da930611885bfb673257e' into model_api
Aug 27, 2018
a6c3a6d
Merge commit '0c053705d61082b5b56e961f03c04d92911b43bf' into model_api
Aug 27, 2018
3547d3a
Proof Read & Corrections
Aug 27, 2018
ecff0af
Merge commit 'a9c1092a7546e27123020fbdf65e81899bfeb41e' into model_api
Aug 27, 2018
8d0462c
Merge commit '03d0a3702c6fbeb501016557c51dd5c86c2a78ca' into model_api
Aug 27, 2018
ddcf6ab
test pooling 1d
zsdonghao Aug 27, 2018
645e771
Error fix
Aug 27, 2018
5329606
Merge commit '16067ae05f742c55d03354f2514e910cc7663a52' into model_api
Aug 27, 2018
4167c96
test pooling 3d
zsdonghao Aug 27, 2018
b24259d
Merge commit '83273d3df93e4ceefd2a3a655442208e91eee7d4' into model_api
Aug 27, 2018
4c4fb23
Merge commit '8fb5de83227aa0d1211d6ecf4c545be41aaf28f6' into model_api
Aug 27, 2018
6ab5f8e
Merge commit '52b8eccc4d0968d91e50a3097d373fecb74a595d' into model_api
Aug 27, 2018
f5836b3
Merge remote-tracking branch 'origin/model_api_hao' into model_api
Aug 27, 2018
5c21394
Automatic Print Act and Output Shape
Aug 27, 2018
e762ee5
Merge remote-tracking branch 'origin/model_api_hao' into model_api
Aug 27, 2018
dca5d50
Dropconnect bugfix re-applied
Aug 27, 2018
18112e0
test rnn
zsdonghao Aug 27, 2018
a99caf3
YAPF Cleaning
Aug 27, 2018
ed773b9
Merge branch 'model_api_hao' into model_api
Aug 27, 2018
58939a6
Merge branch 'master' into model_api
Aug 27, 2018
bf15e1f
YAPF Cleaning
Aug 27, 2018
9dc94a6
refacted RNN layers
zsdonghao Aug 27, 2018
a4bcfeb
test EmbeddingLayer + RNN
zsdonghao Aug 27, 2018
93b1cdc
EmbeddingInputLayer fixed
Aug 27, 2018
55fa0d8
test rnn
zsdonghao Aug 27, 2018
c254520
Merge branch 'master' into model_api
Aug 28, 2018
ac7ef9a
Various Improvements & is_train integrated in self._temp_data
Aug 28, 2018
3edf97e
Layer.compile() does not need `is_train` anymore
Aug 28, 2018
3fe8883
trainable for tf.get_var() added
Aug 28, 2018
29d64aa
compile takes now no argument
Aug 28, 2018
9757c9b
YAPF Cleaning applied
Aug 28, 2018
ed3ad39
YAPF Cleaning applied
Aug 28, 2018
ece7979
fangde branch
zsdonghao Sep 4, 2018
da66023
rm app
zsdonghao Sep 4, 2018
31e0580
Release 1.10.1
Sep 5, 2018
7b66b30
Merge branch 'model_api_fangde' into model_api
Sep 5, 2018
b0869c7
Pin imageio to latest version 2.4.0
pyup-bot Sep 6, 2018
fdd2e54
Pin pytest to latest version 3.8.0
pyup-bot Sep 6, 2018
ae9f0fd
Update requirements_test.txt
Sep 7, 2018
9a099ee
Update requirements.txt
Sep 7, 2018
1d451b9
Update CHANGELOG.md
Sep 7, 2018
b7a007b
Merge branch 'master' into pyup-scheduled-update-2018-09-06
Sep 7, 2018
a796cc8
Merge branch 'master' into pyup-scheduled-update-2018-09-06
Sep 7, 2018
2c4876c
Merge branch 'master' into release_1.10.1
Sep 7, 2018
fee3de7
Merge remote-tracking branch 'origin/pyup-scheduled-update-2018-09-06…
Sep 7, 2018
9fdd8f9
Changelog Updated
Sep 7, 2018
e218085
Travis Updated
Sep 7, 2018
4417bf3
support channel_first
zsdonghao Sep 7, 2018
25d85c4
Merge branch 'master' into channel_format
zsdonghao Sep 7, 2018
ac17b83
Merge branch 'release_1.10.1' into model_api
Sep 7, 2018
413be02
YAPF Applied
Sep 7, 2018
0d0def8
Merge branch 'pyup-scheduled-update-2018-09-06' into release_1.10.1
Sep 7, 2018
5191231
Merge remote-tracking branch 'origin/channel_format' into release_1.10.1
Sep 7, 2018
37d972c
Merge branch 'release_1.10.1' into model_api
Sep 7, 2018
a1866a1
YAPF Corrections Applied
Sep 7, 2018
105b4fe
Merge branch 'pyup-scheduled-update-2018-09-06' into release_1.10.1
Sep 7, 2018
42c23b9
YAPF Corrections
Sep 7, 2018
5b491c6
Merge branch 'channel_format' into release_1.10.1
Sep 7, 2018
f6c1e3a
Merge branch 'release_1.10.1' into model_api
Sep 7, 2018
e891f22
Merge branch 'master' into release_1.10.1
Sep 7, 2018
9e8be67
Changelog cleaned [SKIP CI]
Sep 7, 2018
4ed2dc1
Merge branch 'release_1.10.1' into model_api
Sep 7, 2018
cf0fde8
Merge branch 'master' into model_api
Sep 7, 2018
cc652fd
Typo fix in Changelog
Sep 10, 2018
6ac996c
Merge branch 'master' into model_api_hao
Sep 10, 2018
7a442e1
Merge branch 'master' into model_api
Sep 18, 2018
bef581f
Merge branch 'master' into model_api
Sep 18, 2018
059cfef
Merge branch 'master' into model_api
Sep 22, 2018
d65b932
rm files
zsdonghao Sep 26, 2018
93b7fc7
refactor basic_tutorial
zsdonghao Sep 26, 2018
e3e6253
Merge branch 'master' into model_api
Sep 26, 2018
421ab54
YAPF Cleaning
Sep 26, 2018
ff837db
Merge branch 'master' into model_api
Sep 26, 2018
8c017f4
Merge branch 'model_api' into model_api_hao
Sep 26, 2018
292cd4d
refactor and test RNNs
zsdonghao Sep 26, 2018
104c33d
Merge branch 'model_api_hao' of github.com:tensorlayer/tensorlayer in…
zsdonghao Sep 26, 2018
c1ae2dc
rm tf in tests
zsdonghao Sep 26, 2018
8532099
refactor seq2seq
zsdonghao Sep 26, 2018
b6b730f
refactor and test DynamicRNNs
zsdonghao Sep 26, 2018
09b2cda
Bug fixes + new unittests
Sep 26, 2018
43e62d6
Cleaning Custom2D unittest
Sep 26, 2018
96d588f
working on seq2seq
zsdonghao Sep 27, 2018
2b3a3aa
TL 2.0 Multiple Inputs fix
Sep 27, 2018
51ec294
All Input Layers Tested
Sep 27, 2018
1113ff6
Bug Fix
Sep 27, 2018
3f8e258
YAPF Cleaning
Sep 27, 2018
5f85bb4
Additional cleaning
Sep 27, 2018
93ff917
Merge branch 'model_api_hao' into model_api
Sep 27, 2018
64474e0
Further cleaning and simplifications
Sep 27, 2018
b43feae
Bug Fix in Seq2Seq
Sep 27, 2018
c7a7249
add _temp_data to RNNs
zsdonghao Sep 27, 2018
acb5448
temp_data - word2vec embedding inputlayer
zsdonghao Sep 27, 2018
de0076b
temp data sequence length - dynamic rnn layers
zsdonghao Sep 27, 2018
c0a27a3
Additional Optional CompiledLayer Attribute Supported
Sep 27, 2018
6c34336
Merge branch 'model_api_hao' of https://github.com/tensorlayer/tensor…
Sep 27, 2018
be89daa
Bug Fix Correction
Sep 27, 2018
3175458
Bug Fix
Sep 27, 2018
f618559
fix self.sequence_length
zsdonghao Sep 27, 2018
230822a
birnnlayer is_train
zsdonghao Sep 27, 2018
6322513
Seq2Seq bug fix - Requiring unprocessed inputs
Sep 28, 2018
1c6a991
Merge branch 'model_api_hao' of https://github.com/tensorlayer/tensor…
Sep 28, 2018
38d7b1a
Merge branch 'master' into model_api
Sep 28, 2018
2952424
fix DynamicRNN for Seq2seq
zsdonghao Sep 28, 2018
dd4858b
seq2seq is_train
zsdonghao Sep 28, 2018
7d40681
Merge branch 'model_api_hao' into model_api
Sep 28, 2018
892375d
fix bug seq2seq
zsdonghao Sep 28, 2018
39b4793
Merge branch 'model_api_hao' of github.com:tensorlayer/tensorlayer in…
zsdonghao Sep 28, 2018
e090815
Merge branch 'master' into model_api
Sep 28, 2018
eeb67ee
Merge branch 'model_api_hao' into model_api
Sep 28, 2018
534ff70
Errors induced by non IDE softwares - Corrections
Sep 30, 2018
a334edf
Repo Cleaning
Sep 30, 2018
3e0f431
Changelog Updated
Sep 30, 2018
2706afb
Merge branch 'master' into model_api
Sep 30, 2018
68049ff
Test Sequential RNN Refactored & Cleaned
Sep 30, 2018
5a70b82
`.compile` op renamed into `.build` op
Oct 1, 2018
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
31 changes: 28 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,29 @@ To release a new version, please update the changelog as followed:
### Added
- Layer:
- Release `GroupNormLayer` (PR #850)
- Tests:
- `test_model_compilednetwork.py` has been introduced to test the class `tl.models.CompiledNetwork` (PR #755).
- `test_network_custom_input_layers.py` has been introduced to test the class `tl.networks.CustomModel` (PR #755).
- `test_network_custom_multiple_inputs.py` has been introduced to test the class `tl.networks.CustomModel` (PR #755).
- `test_network_custom_multiple_outputs.py` has been introduced to test the class `tl.networks.CustomModel` (PR #755).
- `test_network_custom_2d.py` has been introduced to test the class `tl.networks.CustomModel` (PR #755).
- `test_network_sequential_1d.py` has been introduced to test the class `tl.networks.Sequential` with 1D data Layers (PR #755).
- `test_network_sequential_2d.py` has been introduced to test the class `tl.networks.Sequential` with 2D data Layers (PR #755).
- `test_network_sequential_3d.py` has been introduced to test the class `tl.networks.Sequential` with 3D data Layers (PR #755).
- `test_network_sequential_rnn.py` has been introduced to test the class `tl.networks.Sequential` with 3D data Layers (PR #755).

### Changed
- API:
- `tl.models` has been renamed to `tl.nets` to comply with TF Slim naming convention: https://github.com/tensorflow/models/tree/master/research/slim (PR #755)
- `layer.all_params` renamed `layer.all_weights` to reduce confusion (params != hyperparameters, params = weights) (PR #755)
- `layer.count_params()` renamed `layer.count_weights()` to reduce confusion (params != hyperparameters, params = weights) (PR #755)
- `layer.get_all_params()` renamed `layer.get_all_weights()` to reduce confusion (params != hyperparameters, params = weights) (PR #755)
- `layer.print_params()` renamed `layer.print_weights()` to reduce confusion (params != hyperparameters, params = weights) (PR #755)
- `tl.layers.ROIPoolingLayer` has been moved to `tl.layers.contrib.ROIPoolingLayer` (PR #755)
- `tl.layers.QuanDenseLayer` renamed to `tl.layers.QuantizedDense` (PR #755)
- `tl.layers.QuanDenseLayerWithBN` renamed to `tl.layers.QuantizedDenseWithBN` (PR #755)
- `tl.layers.QuanConv2d` renamed to `tl.layers.QuantizedConv2d` (PR #755)
- `tl.layers.QuanConv2dWithBN` renamed to `tl.layers.QuantizedConv2dWithBN` (PR #755)

### Dependencies Update
- yapf>=0.22,<0.24 => yapf>=0.22,<0.25 (PR #829)
Expand All @@ -88,12 +109,16 @@ To release a new version, please update the changelog as followed:
- Correct offset calculation in `tl.prepro.transform_matrix_offset_center` (PR #855)

### Removed
- `tl.layers.EstimatorLayer` has been removed in favor of `tl.layers.LambdaLayer` (PR #755)
- `tl.layers.ReconLayer` has been removed in favor of `tl.layers.DenseLayer` (#755)
- `tl.layers.MultiplexerLayer` has been removed in favor of eager execution mode (#755)

### Security

### Contributors
- @2wins: #850 #855
- @DEKHTIARJonathan: #853
- @DEKHTIARJonathan: #755 #853
- @zsdonghao: #755

## [1.10.1] - 2018-09-07

Expand All @@ -104,7 +129,7 @@ To release a new version, please update the changelog as followed:
- 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)
- TL Graph API removed. Memory Leaks Issues with Graph API, will be fixed and integrated in TL 2.0 (PR #818)

### Fixed
- Issue #817 fixed: TL 1.10.0 - Memory Leaks and very slow network creation.
Expand All @@ -117,7 +142,7 @@ To release a new version, please update the changelog as followed:

### Contributors
- @DEKHTIARJonathan: #815 #818 #820 #823
- @ndiy: #819
- @ndiy: #819
- @zsdonghao: #818

## [1.10.0] - 2018-09-02
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
BUILDDIR = build

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
Expand Down
39 changes: 27 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#! /usr/bin/python
# -*- coding: utf-8 -*-
#

# TensorLayer documentation build configuration file, created by
# sphinx-quickstart on Tue Aug 2 15:30:55 2016.
#
Expand All @@ -16,13 +16,25 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os, sys, datetime
sys.path.insert(0, os.path.abspath("../")) # Important
sys.path.insert(0, os.path.abspath(os.path.join("..", "tensorlayer"))) # Important

from package_info import __shortversion__
from package_info import __version__
import os

import datetime
import importlib

os.environ["SPHINXBUILD"] = "True"
os.environ["CUDA_VISIBLE_DEVICES"] = "0"

pkg_info_path = os.path.join("..", "tensorlayer", "package_info.py")


def import_pyfile_as_module(absolute_path):
spec = importlib.util.spec_from_file_location(absolute_path, absolute_path)
module = spec.loader.load_module(spec.name)
return module


pkg_info = import_pyfile_as_module(pkg_info_path)

# -- General configuration ------------------------------------------------

Expand All @@ -36,14 +48,17 @@

# extensions = [
# 'sphinx.ext.coverage',
# 'sphinx.ext.doctest',
# 'sphinx.ext.githubpages',
# 'numpydoc',
# ]

conf_file_path = os.path.realpath(__file__)
tensorlayer_dir = os.path.dirname(os.path.dirname(conf_file_path))

extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.ifconfig',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.intersphinx',
Expand Down Expand Up @@ -102,9 +117,9 @@
# built documents.
#
# The short X.Y version.
version = __shortversion__
version = pkg_info.__version__
# The full version, including alpha/beta/rc tags.
release = __version__
release = pkg_info.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -125,7 +140,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ['build', 'Thumbs.db', '.DS_Store']

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand Down
2 changes: 1 addition & 1 deletion docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set BUILDDIR=build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
Expand Down
39 changes: 14 additions & 25 deletions docs/modules/layers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ Layer list
AverageEmbeddingInputlayer

DenseLayer
ReconLayer
DropoutLayer
GaussianNoiseLayer
DropconnectDenseLayer
Expand Down Expand Up @@ -248,17 +247,15 @@ Layer list
TernaryConv2d
DorefaDenseLayer
DorefaConv2d
QuanDenseLayer
QuanDenseLayerWithBN
QuanConv2d
QuanConv2dWithBN
QuantizedDense
QuantizedDenseWithBN
QuantizedConv2d
QuantizedConv2dWithBN

PReluLayer
PRelu6Layer
PTRelu6Layer

MultiplexerLayer

flatten_reshape
clear_layers_name
initialize_rnn_state
Expand Down Expand Up @@ -298,7 +295,7 @@ The following is an example implementation of a layer that multiplies its input
self.outputs = self.inputs * 2

# update layer (customized)
self._add_layers(self.outputs)


Your Dense Layer
^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -337,8 +334,8 @@ At the end, for a layer with parameters, we also append the parameters into ``al
self.outputs = self._apply_activation(tf.matmul(self.inputs, W) + b)

# update layer (customized)
self._add_layers(self.outputs)
self._add_params([W, b])



.. -----------------------------------------------------------
.. Basic Layers
Expand Down Expand Up @@ -587,14 +584,6 @@ see `Slim-model <https://github.com/tensorflow/models/tree/master/research/slim>



.. -----------------------------------------------------------
.. Flow Control Layer
.. -----------------------------------------------------------

Flow Control Layer
----------------------
.. autoclass:: MultiplexerLayer

.. -----------------------------------------------------------
.. Image Resampling Layers
.. -----------------------------------------------------------
Expand Down Expand Up @@ -838,24 +827,24 @@ DorefaConv2d
Quantization Dense Layer
^^^^^^^^^^^^^^^^^^^^^^^^^^

QuanDenseLayer
QuantizedDense
"""""""""""""""""""""
.. autoclass:: QuanDenseLayer
.. autoclass:: QuantizedDense

QuanDenseLayerWithBN
QuantizedDenseWithBN
""""""""""""""""""""""""""""""""""""
.. autoclass:: QuanDenseLayerWithBN
.. autoclass:: QuantizedDenseWithBN

Quantization Convolutions
^^^^^^^^^^^^^^^^^^^^^^^^^^

Quantization
"""""""""""""""""""""
.. autoclass:: QuanConv2d
.. autoclass:: QuantizedConv2d

QuanConv2dWithBN
QuantizedConv2dWithBN
"""""""""""""""""""""
.. autoclass:: QuanConv2dWithBN
.. autoclass:: QuantizedConv2dWithBN


.. -----------------------------------------------------------
Expand Down
37 changes: 20 additions & 17 deletions examples/basic_tutorials/tutorial_cifar10_datasetapi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""Using Dataset API and tf.image can obtain the best performance."""

import time
Expand All @@ -26,19 +27,19 @@ def model_batch_norm(x_crop, y_, is_train, reuse):
W_init2 = tf.truncated_normal_initializer(stddev=0.04)
b_init2 = tf.constant_initializer(value=0.1)
with tf.variable_scope("model", reuse=reuse):
net = InputLayer(x_crop, name='input')
net = Conv2d(net, 64, (5, 5), (1, 1), padding='SAME', W_init=W_init, b_init=None, name='cnn1')
net = BatchNormLayer(net, decay=0.99, is_train=is_train, act=tf.nn.relu, name='batch1')
net = MaxPool2d(net, (3, 3), (2, 2), padding='SAME', name='pool1')

net = Conv2d(net, 64, (5, 5), (1, 1), padding='SAME', W_init=W_init, b_init=None, name='cnn2')
net = BatchNormLayer(net, decay=0.99, is_train=is_train, act=tf.nn.relu, name='batch2')
net = MaxPool2d(net, (3, 3), (2, 2), padding='SAME', name='pool2')

net = FlattenLayer(net, name='flatten')
net = DenseLayer(net, 384, act=tf.nn.relu, W_init=W_init2, b_init=b_init2, name='d1relu')
net = DenseLayer(net, 192, act=tf.nn.relu, W_init=W_init2, b_init=b_init2, name='d2relu')
net = DenseLayer(net, n_units=10, act=None, W_init=W_init2, name='output')
net = InputLayer(name='input')(x_crop)
net = Conv2d(64, (5, 5), (1, 1), padding='SAME', W_init=W_init, b_init=None, name='cnn1')(net)
net = BatchNormLayer(decay=0.99, act=tf.nn.relu, name='batch1')(net, is_train=is_train)
net = MaxPool2d((3, 3), (2, 2), padding='SAME', name='pool1')(net)

net = Conv2d(64, (5, 5), (1, 1), padding='SAME', W_init=W_init, b_init=None, name='cnn2')(net)
net = BatchNormLayer(decay=0.99, act=tf.nn.relu, name='batch2')(net, is_train=is_train)
net = MaxPool2d((3, 3), (2, 2), padding='SAME', name='pool2')(net)

net = FlattenLayer(name='flatten')
net = DenseLayer(384, act=tf.nn.relu, W_init=W_init2, b_init=b_init2, name='d1relu')(net)
net = DenseLayer(192, act=tf.nn.relu, W_init=W_init2, b_init=b_init2, name='d2relu')(net)
net = DenseLayer(n_units=10, act=None, W_init=W_init2, name='output')(net)
y = net.outputs

ce = tl.cost.cross_entropy(y, y_, name='cost')
Expand Down Expand Up @@ -100,17 +101,19 @@ def _map_fn_test(img, target):


# dataset API and augmentation
ds = tf.data.Dataset().from_generator(generator_train, output_types=(tf.float32,
tf.int32)) # , output_shapes=((24, 24, 3), (1)))
ds = tf.data.Dataset().from_generator(
generator_train, output_types=(tf.float32, tf.int32)
) # , output_shapes=((24, 24, 3), (1)))
ds = ds.map(_map_fn_train, num_parallel_calls=multiprocessing.cpu_count())
ds = ds.repeat(n_epoch)
ds = ds.shuffle(shuffle_buffer_size)
ds = ds.prefetch(buffer_size=4096)
ds = ds.batch(batch_size)
value = ds.make_one_shot_iterator().get_next()

ds = tf.data.Dataset().from_generator(generator_test, output_types=(tf.float32,
tf.int32)) # , output_shapes=((24, 24, 3), (1)))
ds = tf.data.Dataset().from_generator(
generator_test, output_types=(tf.float32, tf.int32)
) # , output_shapes=((24, 24, 3), (1)))
ds = ds.shuffle(shuffle_buffer_size)
ds = ds.map(_map_fn_test, num_parallel_calls=multiprocessing.cpu_count())
ds = ds.repeat(n_epoch)
Expand Down
Loading