Fork自 PaddlePaddle / Paddle
* split train_mode and has_grad * fix format * fix ci problems * fix sample code