#NEWLINE# def test_gd_quadratic_nesterov( ) : #NEWLINE# #INDENT# obj = Quadratic ( ) #NEWLINE# opt = GradientDescent ( opt . pars , obj . fprime , step_rate = 0.01 , momentum = 0.9 , momentum_type = 'nesterov' ) #NEWLINE# for ( i , info ) in enumerate ( opt ) : #NEWLINE# #INDENT# if ( i > 500 ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# assert obj . solved ( ) , 'did not find solution'