There is no doc about why PaddlePaddle has so many interfaces that looks very similar but essentially different
Created by: lcy-seso
I find PaddlePaddle has various kinds of RNN unit, take lstm for example, we have:
-
lstmemory in
python/paddle/trainer_config_helpers/layers.py
-
simple_lstm in
python/paddle/trainer_config_helpers/networks.py
-
lstmemory_unit in
python/paddle/trainer_config_helpers/networks.py
-
lstmemory_group in
python/paddle/trainer_config_helpers/networks.py
-
bidirectional_lstm in
python/paddle/trainer_config_helpers/networks.py
(This is relatively easy to understand) -
For GRU, we even have
simple_gru
andsimple_gru2
(The namesimple_gru2
is terrible and confusing).
These interfaces look extremely similar from their names, but they work differently and should be chosen in different situations. Even though there are some explanations spread in the source codes, but they are hard to follow. If I were a beginner to PaddlePaddle, I would definitely be confusing to choose which one to use.
I suggest we create some documents organized by useful topics to explain such a confusing situation.
Besides, some design idea is not consistent or just missing.
- For example, In PaddlePaddle, a fully connected layer and a lstmemory together is a lstm unit as we are familiar to in the textbook, which is also the situation for some other layers, for example, the CRF layer.
- We provide
simple_lstm
to encapsulate a fully connected layer and a lstmmeory layer, following the same idea, why do we not provide such an encapsulation for CRF layer? Such an encapsulation for simple RNN is also missing.