added NaN test for softmax
added NaN test for log_softmax