Fork自 PaddlePaddle / Paddle
* fix the order of sum * add doc * check whether need to copy * follow comments