Dear Yun,
Thanks for your help!
I finally found out where the error came from. When I did normalization on my data, some value divides 0 and got np.nan and when more and more data were fed to the model, the nan error propagates through the network.
Thanks very much for your help!