NaN errors in Flux

I tracked down the problem to a few large outliers in the training data, which caused a NaN when passed to tanh. So far, removing the outliers seems to have solved the problem.