Modified tanh layer, it won't get NaN now.