Created by: qingqing01
Fix https://github.com/PaddlePaddle/Paddle/issues/6841
-
Time: collected by yep + pprof based the config of sentiment analysis
- forward: LSTMUnitFunctor: 9.52s -> 7.95s
- backward: LSTMGradUnitFunctor: 5.60s -> 3.68s
-
Refine the code style for the activation type
- But the old code is not removed, since it is used in GRU operator. This will be fixed in next PR.
-
Still use
std::string
type in the attribute definition.- By using the
int
type in the attribute definition, the time is close with thestd::string
type.
- By using the