public void setMomentum ( double momentum ) { if ( momentum < 0 || Double . isNaN ( momentum ) || Double . isInfinite ( momentum ) ) throw new ArithmeticException ( "Momentum must be non negative, not " + momentum ) ; this . momentum = momentum ; }
Sets the non negative momentum used in training .