YingLaiLin:

o solve this problem, you must be know what lead to nan during the training process. I think the logvar.exp() in the following fomula lead to overflow in the running process


I can second this, I clip log var value and also just add an assertion to detect NaN values