@t.ouyang Thanks. Your advice solve my NaN problem.
My problem caused due to sqrt(0).
#------------------------------------
There are some useful infomation about why nan problem could happen:
1.the learning rate
2.sqrt(0)
3.ReLU->LeakyReLU