Add cuda check in language model (#2722)
Add cuda check in language model (#2722)

* add gpu check; test=develop

* add cuda check in train; test=develop

PaddlePaddle/models,PaddlePaddle/models,PaddlePaddle/models