Skip to content

Commit 654de4a

Browse files
authored
Merge pull request #998 from tensorlayer/nlp
NLP: Seq2seq, LuongAttention, SimpleRNN, GRURNN, LSTMRNN
2 parents 76c11ae + e72a928 commit 654de4a

File tree

9 files changed

+814
-211
lines changed

9 files changed

+814
-211
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ To release a new version, please update the changelog as followed:
9191
- Add version_info in model.config. (PR #992)
9292
- Replace tf.nn.func with tf.nn.func.\_\_name\_\_ in model config.
9393
- Add Reinforcement learning tutorials. (PR #995)
94+
- Add RNN layers with simple rnn cell, GRU cell, LSTM cell. (PR #998)
95+
- Update Seq2seq (#998)
96+
- Add Seq2seqLuongAttention model (#998)
9497

9598
### Fixed
9699

@@ -100,20 +103,21 @@ To release a new version, please update the changelog as followed:
100103
- @Tokarev-TT-33: #995
101104
- @initial-h: #995
102105
- @Officium: #995
106+
- @ArnoldLIULJ: #998
107+
- @JingqingZ: #998
108+
103109

104110
## [2.0.2] - 2019-6-5
105111

106112
### Changed
107113
- change the format of network config, change related code and files; change layer act (PR #980)
108-
- update Seq2seq (#989)
109114

110115
### Fixed
111116
- Fix dynamic model cannot track PRelu weights gradients problem (PR #982)
112117
- Raise .weights warning (commit)
113118

114119
### Contributors
115120
- @warshallrho: #980
116-
- @ArnoldLIULJ: #989
117121
- @1FengL: #982
118122

119123
## [2.0.1] - 2019-5-17

docs/modules/layers.rst

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,15 @@ Layer list
8080
SwitchNorm
8181

8282
RNN
83+
SimpleRNN
84+
GRURNN
85+
LSTMRNN
8386
BiRNN
8487

8588
retrieve_seq_length_op
8689
retrieve_seq_length_op2
8790
retrieve_seq_length_op3
91+
target_mask_op
8892

8993
Flatten
9094
Reshape
@@ -579,6 +583,18 @@ RNN layer
579583
""""""""""""""""""""""""""
580584
.. autoclass:: RNN
581585

586+
RNN layer with Simple RNN Cell
587+
""""""""""""""""""""""""""""""""""
588+
.. autoclass:: SimpleRNN
589+
590+
RNN layer with GRU Cell
591+
""""""""""""""""""""""""""""""""""
592+
.. autoclass:: GRURNN
593+
594+
RNN layer with LSTM Cell
595+
""""""""""""""""""""""""""""""""""
596+
.. autoclass:: LSTMRNN
597+
582598
Bidirectional layer
583599
"""""""""""""""""""""""""""""""""
584600
.. autoclass:: BiRNN
@@ -593,13 +609,16 @@ Compute Sequence length 1
593609
.. autofunction:: retrieve_seq_length_op
594610

595611
Compute Sequence length 2
596-
""""""""""""""""""""""""""
612+
"""""""""""""""""""""""""""""
597613
.. autofunction:: retrieve_seq_length_op2
598614

599615
Compute Sequence length 3
600-
""""""""""""""""""""""""""
616+
""""""""""""""""""""""""""""
601617
.. autofunction:: retrieve_seq_length_op3
602618

619+
Compute mask of the target sequence
620+
"""""""""""""""""""""""""""""""""""""""
621+
.. autofunction:: target_mask_op
603622

604623

605624

docs/modules/models.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ TensorLayer provides many pretrained models, you can easily use the whole or a p
1313
VGG19
1414
SqueezeNetV1
1515
MobileNetV1
16+
Seq2seq
17+
Seq2seqLuongAttention
18+
1619

1720
Base Model
1821
-----------
@@ -37,3 +40,14 @@ MobileNetV1
3740
----------------
3841

3942
.. autofunction:: MobileNetV1
43+
44+
Seq2seq
45+
------------------------
46+
47+
.. autoclass:: Seq2seq
48+
49+
50+
Seq2seq Luong Attention
51+
------------------------
52+
53+
.. autoclass:: Seq2seqLuongAttention

0 commit comments

Comments
 (0)