Created by: tensor-tang
follow https://github.com/PaddlePaddle/Paddle/issues/11272#issuecomment-395340712