RMSProp implementation modeled off of AdaDelta
Improve memory usage when checking for NaNs