Skip to content
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

TensorLayer 2.0.0-alpha Release #952

Merged
merged 548 commits into from
May 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
548 commits
Select commit Hold shift + click to select a range
9fee931
layernode simple test script
ChrisWu1997 Mar 18, 2019
b8ec923
doc pool
warshallrho Mar 19, 2019
f8ec63b
support dilation in pool1d
warshallrho Mar 19, 2019
440fb84
embedding all tested and docs updated, word2vec examples refactored a…
JingqingZ Mar 19, 2019
69e3319
PRelu activation tested and doc updated
JingqingZ Mar 19, 2019
90394f1
doc some conv layers
warshallrho Mar 20, 2019
a323067
test doc noise
warshallrho Mar 20, 2019
960cbb7
add vgg testing scripts for tf2/tl2
ChrisWu1997 Mar 20, 2019
05f74c5
Merge branch 'tl2-layer' of https://github.com/zsdonghao/tensorlayer2…
ChrisWu1997 Mar 20, 2019
bd2c8e4
update testing results for tf2/tl2
ChrisWu1997 Mar 20, 2019
8f2c8c8
Merge branch 'tl2-layer' of https://github.com/zsdonghao/tensorlayer2…
ChrisWu1997 Mar 20, 2019
f5d6328
Merge branch 'tl2-layer' of github.com:zsdonghao/tensorlayer2 into tl…
JingqingZ Mar 20, 2019
7dc9295
activation layers all tested and doc updated
JingqingZ Mar 20, 2019
8c994f6
Merge branch 'tl2-layer' of github.com:zsdonghao/tensorlayer2 into tl…
JingqingZ Mar 20, 2019
48b9759
vgg test finished, new results added
ChrisWu1997 Mar 20, 2019
c9785b8
Merge branch 'tl2-layer' of https://github.com/zsdonghao/tensorlayer2…
ChrisWu1997 Mar 20, 2019
c93ee0e
delete previous vgg testing codes
ChrisWu1997 Mar 20, 2019
b4c94b3
model core documentation completed for the this time.
ChrisWu1997 Mar 20, 2019
cb00c8b
test padding 1d2d3d
warshallrho Mar 20, 2019
518e593
Merge branch 'tl2-layer' of https://github.com/zsdonghao/tensorlayer2…
ChrisWu1997 Mar 20, 2019
25d284f
save_weights method refactored, sess args removed, documentation added
ChrisWu1997 Mar 21, 2019
572bd89
hdf5 save/load: change encoding format to 'utf-8'
ChrisWu1997 Mar 21, 2019
ce7f5d4
tf2numpy, assign_tf_variable refactored, sess args removed, documenta…
ChrisWu1997 Mar 21, 2019
033021f
model core minor update, unittest finished
ChrisWu1997 Mar 21, 2019
4ee25fa
remove sys.path in the head of model core
ChrisWu1997 Mar 21, 2019
a926a00
doc padding
warshallrho Mar 21, 2019
319bfb1
fix bugs in vgg refine doc
warshallrho Mar 21, 2019
91db4bb
layernode test completed
ChrisWu1997 Mar 21, 2019
70881b6
layernode doc completed
ChrisWu1997 Mar 21, 2019
eb805b7
Merge branch 'tl2-layer' of https://github.com/zsdonghao/tensorlayer2…
ChrisWu1997 Mar 21, 2019
ed90d10
expand_dim and tile layers are both tested and doc updated
JingqingZ Mar 22, 2019
a25ce94
scale layer tested and doc updated
JingqingZ Mar 22, 2019
cacf837
flatten, reshape, transpose layers are all tested and doc updated
JingqingZ Mar 22, 2019
e43f6ce
batchnorm, batchnorm1d/2d/3d doc completed
ChrisWu1997 Mar 22, 2019
3d30583
lambda layer refactored, tested and doc updated
JingqingZ Mar 22, 2019
8722622
BatchNorm BatchNorm1d/2d/3d tested
ChrisWu1997 Mar 22, 2019
2ea469d
Merge branch 'tl2-layer' of github.com:zsdonghao/tensorlayer2 into tl…
JingqingZ Mar 24, 2019
1bb4909
elmentwiselambda layer refactored, tested and doc updated
JingqingZ Mar 24, 2019
7edf81d
basic tutorial updated
JingqingZ Mar 24, 2019
a6b8314
siamese network on mnist examples finished, acc 96.7%
ChrisWu1997 Mar 26, 2019
3860302
tl.files save/load weights methods tested
ChrisWu1997 Mar 26, 2019
9babc12
tl.files save/load weights methods doc finished
ChrisWu1997 Mar 26, 2019
893fcd8
update docs
zsdonghao Mar 27, 2019
3eae254
if layer name is reused, raise exception
JingqingZ Mar 27, 2019
3a903a8
LayerNode for ModelLayer/LayerList bug fixed, tested
ChrisWu1997 Mar 27, 2019
fe87516
modified _set_mode_for_layers() to change is_train of Model components
1FengL Mar 28, 2019
c953538
get start
zsdonghao Mar 31, 2019
017ef3e
Merge branch 'tl2-layer' of github.com:zsdonghao/tensorlayer2 into tl…
zsdonghao Mar 31, 2019
d3bdc54
RNN refactored, tested and doc updated
JingqingZ Mar 31, 2019
ce95bf8
reuse, print, save/load docs added
ChrisWu1997 Apr 1, 2019
f5c189e
Merge branch 'tl2-layer' of https://github.com/zsdonghao/tensorlayer2…
ChrisWu1997 Apr 1, 2019
5fd52a6
minor fix to rnn, train/test
JingqingZ Apr 1, 2019
107291d
layer docs remove dynamic and adv_indexing_op
JingqingZ Apr 1, 2019
7bc4600
local docs
zsdonghao Apr 1, 2019
b7de7ad
input layer become autofunction for docs
zsdonghao Apr 1, 2019
1b5d58d
Merge branch 'master' into tl2-layer
zsdonghao Apr 1, 2019
a2f837f
Merge pull request #1 from zsdonghao/tl2-layer
zsdonghao Apr 1, 2019
72479ab
Update README.md
JingqingZ Apr 1, 2019
164a142
Update CONTRIBUTING.md
JingqingZ Apr 1, 2019
7ef5d1a
Update CONTRIBUTING.md
JingqingZ Apr 1, 2019
335ca0b
Update CONTRIBUTING.md
JingqingZ Apr 2, 2019
1610e6c
Merge pull request #3 from JingqingZ/master
JingqingZ Apr 2, 2019
79901de
make format
JingqingZ Apr 1, 2019
679d9a7
unittest bug fix
JingqingZ Apr 1, 2019
2223e96
minor fix to embedding
JingqingZ Apr 2, 2019
7639be8
CONTRIBUTING.md minor updated
JingqingZ Apr 2, 2019
0bd2ce0
Merge pull request #4 from zsdonghao/rnn
zsdonghao Apr 2, 2019
2bea943
Update contributing.rst
zsdonghao Apr 2, 2019
4438d06
Merge pull request #1 from zsdonghao/master
JingqingZ Apr 2, 2019
84ad6e5
Update README.md
JingqingZ Apr 2, 2019
6fa00ab
Update README.md
JingqingZ Apr 2, 2019
289a040
Update installation.rst
JingqingZ Apr 2, 2019
392b8af
Merge pull request #5 from JingqingZ/master
zsdonghao Apr 3, 2019
c35da99
Update contributing.rst
zsdonghao Apr 3, 2019
c79bddf
requirement bug
JingqingZ Apr 3, 2019
1aa9940
reorganised basic tutorial folder
JingqingZ Apr 3, 2019
492035d
Merge pull request #7 from zsdonghao/jingqing-patch
zsdonghao Apr 3, 2019
ff85f45
Update requirements_doc.txt
zsdonghao Apr 3, 2019
a1e3d04
remove useless items and add items in files/layers rst
ChrisWu1997 Apr 3, 2019
7229dbe
doc bug
JingqingZ Apr 3, 2019
aaed857
Merge pull request #8 from zsdonghao/jingqing-patch
zsdonghao Apr 3, 2019
6e6b5c9
delete useless files in basic tutorial
ChrisWu1997 Apr 3, 2019
87eb4f9
UpSampling2D/DownSampling2D refactored, tested, doced
ChrisWu1997 Apr 3, 2019
bc89e47
Update get_start_advance.rst
warshallrho Apr 3, 2019
ba93079
fix small bugs in resampling doc
ChrisWu1997 Apr 3, 2019
2fe2a69
Merge pull request #9 from ChrisWu1997/master
zsdonghao Apr 4, 2019
c7e1980
enable model auto-naming & allow layers in different models have the …
1FengL Apr 4, 2019
9183cc5
enable Model to detect list member variables as its layer
1FengL Apr 4, 2019
ad5b621
check layer name uniqueness in construct_graph()
1FengL Apr 5, 2019
3bc92df
modify model.__repr__() to report model name
1FengL Apr 5, 2019
5f341ca
add <visited> attribute to LayerNode
1FengL Apr 5, 2019
98fa0e2
fix bug in model auto-naming
1FengL Apr 5, 2019
f3d3a28
raise exception when layers inside model have the same name in dynami…
1FengL Apr 5, 2019
b2d7f1b
rnn in_channels
JingqingZ Apr 5, 2019
0219a77
add auto naming test
1FengL Apr 5, 2019
281f013
minor fixe lambda test
JingqingZ Apr 5, 2019
a8750f0
remove deprecated doc in flatten_shape
JingqingZ Apr 5, 2019
2056a66
birnn refactored, tested and doc updated, other minor changes to rnn
JingqingZ Apr 5, 2019
d9aeb67
minor doc update
JingqingZ Apr 5, 2019
0686d1c
add layer name uniqueness test
1FengL Apr 6, 2019
cd0c1b1
add vgg auto naming test
1FengL Apr 6, 2019
2eb86fa
stacked rnn and birnn tested
JingqingZ Apr 6, 2019
cb3fb1c
Merge pull request #11 from zsdonghao/model_name_scope
JingqingZ Apr 6, 2019
00b474f
save_weights refactored, support nested senario (three level may caus…
ChrisWu1997 Apr 6, 2019
409145c
test save/load_weights, there is one case left for future
ChrisWu1997 Apr 6, 2019
cb17f8f
model.get_layer created, tested, doced
ChrisWu1997 Apr 6, 2019
5237075
autoname test bug fixed
JingqingZ Apr 6, 2019
f3bc596
fix bug in detecting failure cases, add layerlist test
1FengL Apr 6, 2019
f2c1e05
enable LayerList to detect duplicate layer names, add model layer nam…
1FengL Apr 6, 2019
3cf9b2f
Merge pull request #14 from zsdonghao/model_name_scope
JingqingZ Apr 6, 2019
12e9016
fix bug in test_auto_naming.py
1FengL Apr 6, 2019
e260e20
Merge remote-tracking branch 'upstream/master'
ChrisWu1997 Apr 7, 2019
63248e3
update save/load hdf5, recursively save/load
ChrisWu1997 Apr 7, 2019
83cf276
test save/load with multiple nested model, layerlist and modellayer
ChrisWu1997 Apr 7, 2019
4ec5fee
Merge pull request #13 from ChrisWu1997/master
ChrisWu1997 Apr 8, 2019
6016ac9
rnn in_channels
JingqingZ Apr 5, 2019
55a3aea
minor fixe lambda test
JingqingZ Apr 5, 2019
c4d88cd
remove deprecated doc in flatten_shape
JingqingZ Apr 5, 2019
86fedc6
birnn refactored, tested and doc updated, other minor changes to rnn
JingqingZ Apr 5, 2019
65b6b02
minor doc update
JingqingZ Apr 5, 2019
55fc004
stacked rnn and birnn tested
JingqingZ Apr 6, 2019
7060208
remove all tf.function in layers
JingqingZ Apr 8, 2019
e38c93b
dropout bug fixed and tested
JingqingZ Apr 8, 2019
1db785a
make format
JingqingZ Apr 8, 2019
e143e8b
layer tests and model tests bug fixed
JingqingZ Apr 8, 2019
0677e75
conflict solved
JingqingZ Apr 8, 2019
f99ac3f
make format
JingqingZ Apr 8, 2019
e728f69
Merge pull request #12 from zsdonghao/rnn
JingqingZ Apr 8, 2019
ed59537
Merge branch 'master' of https://github.com/zsdonghao/tensorlayer2
warshallrho Apr 8, 2019
3cabfea
save / load model structure to hdf5
warshallrho Apr 8, 2019
6bc09b0
support save load with / without weights, docs need to be updated
warshallrho Apr 8, 2019
74e16b2
update model.save load, docs need to be updated, and unittest is needed
warshallrho Apr 11, 2019
e2c1eed
the exception in test_layer_name_uniqueness now is raised due to laye…
1FengL Apr 11, 2019
f207333
examples/data_process refactored, tested, except tfrecord3
ChrisWu1997 Apr 11, 2019
c9f3abe
prepro.py refactored, no test since almost nothing relates to tf
ChrisWu1997 Apr 11, 2019
dd981d0
refactor and test tutorial_keras, remove tutorial_tfslim
ChrisWu1997 Apr 11, 2019
a8c1773
Merge pull request #16 from ChrisWu1997/master
zsdonghao Apr 11, 2019
7f90f0b
Merge branch 'master' into model_name_scope
ChrisWu1997 Apr 12, 2019
f8ac2b7
Merge pull request #15 from zsdonghao/model_name_scope
ChrisWu1997 Apr 12, 2019
7a2fd0c
create STN tutorial in static mode
1FengL Apr 12, 2019
dec72ea
create STN tutorial in dynamic mode
1FengL Apr 12, 2019
73b462c
refactor SpatialTransformer2dAffine as TL2.0 Layer
1FengL Apr 12, 2019
951871f
fix a typo
1FengL Apr 12, 2019
87b638f
enable _get_weights() to use tf.Tensor as initializer
1FengL Apr 12, 2019
787b510
refactor tl.cost, not sure whether test are needed
ChrisWu1997 Apr 12, 2019
742ad69
get_variable_with_initializer() rollback
1FengL Apr 12, 2019
7879711
Merge remote-tracking branch 'upstream/master'
ChrisWu1997 Apr 12, 2019
e8cdf35
tl.initializers refactored, tested
ChrisWu1997 Apr 12, 2019
de33e18
initializers docs created
ChrisWu1997 Apr 12, 2019
fde2836
fix minor bigs in initializers rst
ChrisWu1997 Apr 12, 2019
d9b95b1
Merge branch 'spatial_transformer_network' of github.com:zsdonghao/te…
JingqingZ Apr 12, 2019
17362d9
update the docs for SpatialTransformer2dAffine
1FengL Apr 12, 2019
b8b9008
Merge pull request #18 from ChrisWu1997/master
ChrisWu1997 Apr 13, 2019
65a58ab
Merge pull request #17 from zsdonghao/spatial_transformer_network
ChrisWu1997 Apr 13, 2019
0433500
Merge branch 'master' of https://github.com/zsdonghao/tensorlayer2
warshallrho Apr 16, 2019
630572a
update save load model with/without weights, docs, unittest
warshallrho Apr 17, 2019
69d9220
refactor tl.utils, mainly fit/test/predict
ChrisWu1997 Apr 17, 2019
9c4516a
test tl.utils on tutorial_mnist_simple.py
ChrisWu1997 Apr 17, 2019
90fc655
add GPU mem usage for performance testing, fix bugs in tl.utils
ChrisWu1997 Apr 18, 2019
a85216a
fix bugs in vgg test, now the time for numpy2tensor is counted
ChrisWu1997 Apr 18, 2019
151a974
make format for utils, cost, initializers
ChrisWu1997 Apr 18, 2019
0c7ec14
refine model save load, save a minor bug in conv doc
warshallrho Apr 18, 2019
0beb1b5
Merge branch 'master' of github.com:zsdonghao/tensorlayer2
JingqingZ Apr 18, 2019
8654774
Update CONTRIBUTING.md
JingqingZ Apr 18, 2019
cfdc9cc
Merge pull request #20 from zsdonghao/JingqingZ-patch-1
ChrisWu1997 Apr 19, 2019
21172f2
Merge pull request #19 from ChrisWu1997/master
ChrisWu1997 Apr 19, 2019
91ea15e
Merge branch 'master' of https://github.com/zsdonghao/tensorlayer2
warshallrho Apr 20, 2019
a1e8fda
support lambda func in save/load model
warshallrho Apr 20, 2019
52f088b
stack/unstack tested, doced
ChrisWu1997 Apr 23, 2019
105c033
Add cornerpool2d layer.
Windaway Apr 23, 2019
eff2371
multiple type of dense layers fixed, doced, tested, but needs further…
ChrisWu1997 Apr 23, 2019
3bc8167
Add test code.
Windaway Apr 23, 2019
e30532c
Add shuffle layer.
Windaway Apr 23, 2019
f48b110
Add name for shuflle layer.
Windaway Apr 23, 2019
f7a5637
a temp version, add docs, support keras model
warshallrho Apr 23, 2019
75855bb
add changes to previous change
warshallrho Apr 23, 2019
13ed139
pretrained mobilenet refactored, doced, and tested by tutorial
ChrisWu1997 Apr 24, 2019
301f593
pretrained squeezenet refactored, doced, and tested by tutorial
ChrisWu1997 Apr 24, 2019
095710d
Add paper link and expert huber loss.
Windaway Apr 24, 2019
19e8d92
Update warning message.
Windaway Apr 24, 2019
611b2d0
support save keras layer/model, as well as weights
warshallrho Apr 24, 2019
4e94a75
Merge pull request #22 from ChrisWu1997/master
ChrisWu1997 Apr 24, 2019
c1e28b8
minor change to previous
warshallrho Apr 24, 2019
0e31a1e
Add unit-test for shuffle layer.
Windaway Apr 24, 2019
87cbca6
support model/layer config in dynamic model
warshallrho Apr 24, 2019
fc90f38
update CONTRIBUTING.md for rst usage
ChrisWu1997 Apr 24, 2019
2da70e4
Additional information for new functions
Windaway Apr 25, 2019
8224c37
Merge pull request #21 from Windaway/master
ChrisWu1997 Apr 25, 2019
56a6061
Merge pull request #23 from ChrisWu1997/master
ChrisWu1997 Apr 25, 2019
c2ba3be
add docs and comments about saving / loading lambdalayer
warshallrho Apr 26, 2019
664d1c6
Merge branch 'master' of github.com:zsdonghao/tensorlayer2
JingqingZ Apr 26, 2019
1761ab9
update docs, test elementwiselambda
warshallrho Apr 29, 2019
ece1a7b
update model docs
JingqingZ Apr 29, 2019
31a799f
conflict solved
JingqingZ Apr 29, 2019
a9548a6
minor bug fix in test_auto_naming
JingqingZ Apr 29, 2019
78d747c
Merge pull request #10 from warshallrho/master
ChrisWu1997 Apr 29, 2019
0ce6e91
Merge pull request #25 from zsdonghao/jingqing-patch
JingqingZ Apr 29, 2019
f2a1da6
add cloudpickle to requirement.txt
JingqingZ Apr 29, 2019
208d3cc
Merge pull request #26 from zsdonghao/jingqing-patch
JingqingZ Apr 29, 2019
ca5feb8
fix online doc bug
ChrisWu1997 Apr 29, 2019
56e3e51
Merge pull request #27 from ChrisWu1997/master
JingqingZ Apr 29, 2019
b019952
update static vgg: input range [0, 1], docs, rst, remove redundant files
warshallrho Apr 30, 2019
8f90e9e
Update get_start_model.rst
warshallrho Apr 30, 2019
10bc1a3
Merge pull request #28 from warshallrho/master
ChrisWu1997 May 1, 2019
3e3d01a
Update layers.rst
zsdonghao May 1, 2019
e1706e7
remove redundant file
warshallrho May 1, 2019
ab7f52c
Merge pull request #29 from warshallrho/master
ChrisWu1997 May 1, 2019
749d251
docs - alpha version APIs
zsdonghao May 1, 2019
a1dcfc5
mode->model
warshallrho May 1, 2019
7f2d4fe
Merge pull request #30 from warshallrho/master
ChrisWu1997 May 1, 2019
52db4fa
save version
warshallrho May 2, 2019
34a8d0e
Merge pull request #31 from warshallrho/master
warshallrho May 2, 2019
cc7eea8
Update .travis.yml
zsdonghao May 4, 2019
3ca187b
Update README, CHANGELOG, doc for 2.0 release
ChrisWu1997 May 4, 2019
59fded2
Merge pull request #35 from ChrisWu1997/master
zsdonghao May 4, 2019
5e8bce5
Update setup.travis.cfg
zsdonghao May 4, 2019
a92cc1b
Remove tl.layers.importer
ChrisWu1997 May 4, 2019
5face06
Merge pull request #36 from ChrisWu1997/master
zsdonghao May 4, 2019
9b3d775
Update setup.travis.cfg
zsdonghao May 4, 2019
e7642d7
Update setup.travis.cfg
zsdonghao May 4, 2019
d1a445c
Update setup.travis.cfg
zsdonghao May 4, 2019
f70fdd1
Fix bugs in test files
ChrisWu1997 May 4, 2019
abac35f
Update setup.travis.cfg
zsdonghao May 4, 2019
5849d7a
Merge pull request #37 from ChrisWu1997/master
zsdonghao May 4, 2019
e00f0c7
Update setup.travis.cfg
zsdonghao May 4, 2019
6035b21
Update setup.travis.cfg
zsdonghao May 4, 2019
d0ecaf5
Update .travis.yml
zsdonghao May 4, 2019
1de6fb7
Update .travis.yml
zsdonghao May 4, 2019
102557f
Update setup.travis.cfg
zsdonghao May 4, 2019
eda3002
Update setup.travis.cfg
zsdonghao May 4, 2019
5e9bb4f
Update setup.travis.cfg
zsdonghao May 4, 2019
3ad9bdd
Update Makefile
zsdonghao May 4, 2019
3fd05d1
Update travis.yml and minor bug fixed
ChrisWu1997 May 4, 2019
f244968
Updata documentation for 2.0 release
ChrisWu1997 May 4, 2019
7b12f6a
Merge pull request #38 from ChrisWu1997/master
zsdonghao May 4, 2019
b5865a1
Update .travis.yml
zsdonghao May 4, 2019
c6797ac
Update layers.rst
zsdonghao May 4, 2019
26bf1a9
Update .travis.yml
zsdonghao May 4, 2019
2f30b8e
Clean code stryle for yapf test
ChrisWu1997 May 4, 2019
aa579b6
Update docs for 2.0 release
ChrisWu1997 May 4, 2019
c984a9a
Merge pull request #39 from ChrisWu1997/master
zsdonghao May 4, 2019
d9339c5
Update files.rst
zsdonghao May 4, 2019
2eb3108
Update initializers.rst
zsdonghao May 4, 2019
2522fef
Update initializers.py
zsdonghao May 4, 2019
a644964
Update models.rst
zsdonghao May 4, 2019
5325e9e
Update vgg.py
zsdonghao May 4, 2019
c9e31e2
Update vgg.py
zsdonghao May 4, 2019
590855b
Update core.py
zsdonghao May 4, 2019
eb02242
Update vgg.py for yapf fix
ChrisWu1997 May 4, 2019
2742ca3
Merge pull request #40 from ChrisWu1997/master
zsdonghao May 4, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,4 @@ update_tl.py

# Data Files and ByteCode files
*.gz
*.npz
*.npz
30 changes: 17 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,28 @@ addons:
branches:
only:
- master
- TensorLayer-1.x
- TensorLayer-2.x
- /^\d+\.\d+(\.\d+)?(\S*)?$/

python:
- "3.6"
- "3.5"
- "2.7"
# - "2.7" # TensorLayer 2.0 does not support python2 now

env:

# Backward Compatibility in insured for release less than 1 year old.
# https://pypi.org/project/tensorflow/#history
matrix:
- _TF_VERSION=1.12.0 # Remove on Oct 22, 2019
- _TF_VERSION=1.11.0 # Remove on Sep 28, 2019
- _TF_VERSION=1.10.1 # Remove on Aug 24, 2019
- _TF_VERSION=1.9.0 # Remove on Jul 10, 2019
- _TF_VERSION=1.8.0 # Remove on Apr 28, 2019
- _TF_VERSION=1.7.1 # Remove on May 08, 2019
- _TF_VERSION=1.7.0 # Remove on Mar 29, 2019
- _TF_VERSION=1.6.0 # Remove on Mar 01, 2019
- _TF_VERSION=2.0.0a0
# - _TF_VERSION=1.12.0 # Remove on Oct 22, 2019
# - _TF_VERSION=1.11.0 # Remove on Sep 28, 2019
# - _TF_VERSION=1.10.1 # Remove on Aug 24, 2019
# - _TF_VERSION=1.9.0 # Remove on Jul 10, 2019
# - _TF_VERSION=1.8.0 # Remove on Apr 28, 2019
# - _TF_VERSION=1.7.1 # Remove on May 08, 2019
# - _TF_VERSION=1.7.0 # Remove on Mar 29, 2019
# - _TF_VERSION=1.6.0 # Remove on Mar 01, 2019

global:

Expand Down Expand Up @@ -62,7 +63,7 @@ matrix:
install:
- |
if [[ -v _DOC_AND_YAPF_TEST ]]; then
pip install tensorflow
pip install tensorflow==2.0.0a0
pip install yapf
pip install -e .[doc]
else
Expand Down Expand Up @@ -100,7 +101,8 @@ deploy:
on:
tags: true
python: '3.6'
condition: '$_TF_VERSION = 1.11.0'
condition: '$_TF_VERSION = 2.0.0a0'
# condition: '$_TF_VERSION = 1.11.0'

# Documentation: https://docs.travis-ci.com/user/deployment/releases/
- provider: releases
Expand All @@ -113,4 +115,6 @@ deploy:
on:
tags: true
python: '3.6'
condition: '$_TF_VERSION = 1.11.0'
condition: '$_TF_VERSION = 2.0.0a0'
# condition: '$_TF_VERSION = 1.11.0'

20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,26 @@ To release a new version, please update the changelog as followed:
### Contributors
@zsdonghao: #931


## [2.0.0-alpha] - 2019-05-04

### Changed
* update for TensorLayer 2.0.0 alpha version (PR #952)
* support TensorFlow 2.0.0-alpha
* support both static and dynamic model building

### Dependencies Update
- tensorflow>=1.6,<1.13 => tensorflow>=2.0.0-alpha (PR #952)
- h5py>=2.9 (PR #952)
- cloudpickle>=0.8.1 (PR #952)
- remove matplotlib

### Contributors
- @zsdonghao
- @JingqingZ
- @ChrisWu1997
- @warshallrho

## [1.11.1] - 2018-11-15

### Changed
Expand Down
156 changes: 149 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# TensorLayer Contributor Guideline

## Welcome to contribute!
You are more than welcome to contribute to TensorLayer! If you have any improvement, please send us your [pull requests](https://help.github.com/en/articles/about-pull-requests). You may implement your improvement on your [fork](https://help.github.com/en/articles/working-with-forks).

## Checklist
* Continuous integration
* Build from sources
* Unittest
* Documentation
* General intro to TensorLayer2
* How to contribute a new `Layer`
* How to contribute a new `Model`
* How to contribute a new example/tutorial

## Continuous integration

We appreciate contributions
Expand All @@ -24,8 +37,8 @@ to apply those tools before submitting your PR.

```bash
# First clone the repository and change the current directory to the newly cloned repository
git clone https://github.com/tensorlayer/tensorlayer.git
cd tensorlayer
git clone https://github.com/zsdonghao/tensorlayer2.git
cd tensorlayer2

# Install virtualenv if necessary
pip install virtualenv
Expand All @@ -43,15 +56,144 @@ venv\Scripts\activate.bat

# ============= IF TENSORFLOW IS NOT ALREADY INSTALLED ============= #

# for a machine **without** an NVIDIA GPU
pip install -e .[all_cpu_dev] --upgrade
# basic installation
pip install .

# advanced: for a machine **without** an NVIDIA GPU
pip install -e ".[all_cpu_dev]"

# for a machine **with** an NVIDIA GPU
pip install -e .[all_gpu_dev] --upgrade
# advanced: for a machine **with** an NVIDIA GPU
pip install -e ".[all_gpu_dev]"
```

Launching the unittest:
## Unittest

Launching the unittest for the whole repo:

```bash
# install pytest
pip install pytest

# run pytest
pytest
```

Running your unittest code on your implemented module only:

```bash
# install coverage
pip install coverage

cd /path/to/your/unittest/code
# For example: cd tests/layers/

# run unittest
coverage run --source myproject.module -m unittest discover
# For example: coverage run --source tensorlayer.layers -m unittest discover

# generate html report
coverage html
```

## Documentation
Even though you follow [numpydoc](https://numpydoc.readthedocs.io/en/latest/) document style when writing your code,
this does not ensure those lines appear on TensorLayer online documentation.
You need further modify corresponding RST files in `docs/modules`.

For example, to add your implemented new pooling layer into documentation, modify `docs/modules/layer.rst`. First, insert layer name under Layer list
```rst
Layer list
----------
.. autosummary::
NewPoolingLayer
```

Second, find pooling layer part and add:
```rst
.. -----------------------------------------------------------
.. Pooling Layers
.. -----------------------------------------------------------
Pooling Layers
------------------------
New Pooling Layer
^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: NewPoolingLayer
```

Finally, test with local documentation:
```bash
cd ./docs

make clean
make html
# then view generated local documentation by ./html/index.html
```

## General intro to TensorLayer2
* TensorLayer2 is built on [TensorFlow2](https://www.tensorflow.org/alpha), so TensorLayer2 is purely eager, no sessions, no globals.
* TensorLayer2 supports APIs to build static models and dynamic models. Therefore, all `Layers` should be compatible with the two modes.
```python
# An example of a static model
# A static model has inputs and outputs with fixed shape.
inputs = tl.layers.Input([32, 784])
dense1 = tl.layers.Dense(n_units=800, act=tf.nn.relu, in_channels=784, name='dense1')(inputs)
dense2 = tl.layers.Dense(n_units=10, act=tf.nn.relu, in_channels=800, name='dense2')(dense1)
model = tl.models.Model(inputs=inputs, outputs=dense2)

# An example of a dynamic model
# A dynamic model has more flexibility. The inputs and outputs may be different in different runs.
class CustomizeModel(tl.models.Model):
def __init__(self):
super(CustomizeModel, self).__init__()
self.dense1 = tl.layers.Dense(n_units=800, act=tf.nn.relu, in_channels=784, name='dense1')
self.dense2 = tl.layers.Dense(n_units=10, act=tf.nn.relu, in_channels=800, name='dense2')

# a dynamic model allows more flexibility by customising forwarding.
def forward(self, x, bar=None):
d1 = self.dense1(x)
if bar:
return d1
else:
d2 = self.dense2(d1)
return d1, d2

model = CustomizeModel()
```
* More examples can be found in [examples](examples/) and [tests/layers](tests/layers/). Note that not all of them are completed.

## How to contribute a new `Layer`
* A `NewLayer` should be a derived from the base class [`Layer`](tensorlayer/layers/core.py).
* Member methods to be overrided:
- `__init__(self, args1, args2, inputs_shape=None, name=None)`: The constructor of the `NewLayer`, which should
- Call `super(NewLayer, self).__init__(name)` to construct the base.
- Define member variables based on the args1, args2 (or even more).
- If the `inputs_shape` is provided, call `self.build(inputs_shape)` and set `self._built=True`. Note that sometimes only `in_channels` should be enough to build the layer like [`Dense`](tensorlayer/layers/dense/base_dense.py).
- Logging by `logging.info(...)`.
- `__repr__(self)`: Return a printable representation of the `NewLayer`.
- `build(self, inputs_shape)`: Build the `NewLayer` by defining weights.
- `forward(self, inputs, **kwargs)`: Forward feeding the `NewLayer`. Note that the forward feeding of some `Layers` may be different during training and testing like [`Dropout`](tensorlayer/layers/dropout.py).
* Unittest:
- Unittest should be done before a pull request. Unittest code can be written in [tests/](tests/)
* Documents:
- Please write a description for each class and method in RST format. The description may include the functionality, arguments, references, examples of the `NewLayer`.
* Examples: [`Dense`](tensorlayer/layers/dense/base_dense.py), [`Dropout`](tensorlayer/layers/dropout.py), [`Conv`](tensorlayer/layers/convolution/simplified_conv.py).

## How to contribute a new `Model`
* A `NewModel` should be derived from the base class [`Model`](tensorlayer/models/core.py) (if dynamic) or an instance of [`Model`](tensorlayer/models/core.py) (if static).
* A static `NewModel` should have fixed inputs and outputs. Please check the example [`VGG_Static`](tensorlayer/models/vgg.py)
* A dynamic `NewModel` has more flexiblility. Please check the example [`VGG16`](tensorlayer/models/vgg16.py)

## How to contribute a new example/tutorial
* A new example/tutorial should implement a complete workflow of deep learning which includes (but not limited)
- `Models` construction based on `Layers`.
- Data processing and loading.
- Training and testing.
- Forward feeding by calling the models.
- Loss function.
- Back propagation by `tf.GradientTape()`.
- Model saving and restoring.
* Examples: [MNIST](examples/basic_tutorials/tutorial_mnist_mlp_static.py), [CIFAR10](examples/basic_tutorials/tutorial_cifar10_cnn_static.py), [FastText](examples/text_classification/tutorial_imdb_fasttext.py)
31 changes: 7 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,23 @@ default:
@echo "\tmake install3 # install tensorlayer in current workspace with pip3"

lint:
pylint example/*.py
pylint examples/*.py
pylint tensorlayer

test:
python3 tests/test_yapf_format.py
# python3 tests/test_pydocstyle.py
python3 tests/test_mnist_simple.py
python3 tests/test_reuse_mlp.py
python3 tests/test_layers_basic.py
python3 tests/test_layers_convolution.py
python3 tests/test_layers_core.py
python3 tests/test_layers_extend.py
python3 tests/test_layers_flow_control.py
python3 tests/test_layers_importer.py
python3 tests/test_layers_merge.py
python3 tests/test_layers_normalization.py
python3 tests/test_layers_pooling.py
python3 tests/test_layers_recurrent.py
python3 tests/test_layers_shape.py
python3 tests/test_layers_spatial_transformer.py
python3 tests/test_layers_special_activation.py
python3 tests/test_layers_stack.py
python3 tests/test_layers_super_resolution.py
python3 tests/test_layers_time_distributed.py
python3 tests/models/test_model_core.py
python3 tests/layers/test_layernode.py
python3 tests/files/test_utils_saveload.py

format:
autoflake -i example/*.py
autoflake -i examples/*.py
autoflake -i tensorlayer/*.py
autoflake -i tensorlayer/**/*.py

isort -rc example
isort -rc examples
isort -rc tensorlayer

yapf -i example/*.py
yapf -i examples/*.py
yapf -i tensorlayer/*.py
yapf -i tensorlayer/**/*.py

Expand Down
Loading