@@ -23,29 +23,24 @@ def reset (self):
2323 self .jacobian_counter = 0
2424
2525 def impl_compute (self , result , x ):
26- print ("Engine: impl_compute" )
2726 self .computeData (x )
2827
2928 def impl_gradient (self , result , x ):
3029 return NotImplementedError
3130
3231 def impl_jacobian (self , result , x ):
33- print ("Engine: impl_jacobian" )
3432 self .computeJacobian (x )
3533
3634 def jacobian (self , x ):
37- print ("Engine: jacobian" )
3835 self .computeJacobian (x )
3936
4037 def computeData (self , x ):
41- print ("Engine: computing data" )
4238 self .compute_counter += 1
4339 # For each square function
4440 for i in range (self .n ):
4541 self .data [i ] = x [2 * i ]** 2 + x [2 * i + 1 ]** 2
4642
4743 def computeJacobian (self , x ):
48- print ("Engine: computing Jacobian" )
4944 self .jacobian_counter += 1
5045 self .jac .fill (0. )
5146 # For each square function
@@ -68,11 +63,9 @@ def __init__ (self, engine, idx):
6863 self .idx = idx
6964
7065 def impl_compute (self , result , x ):
71- print ("Function %i: copying data" % self .idx )
7266 result [0 ] = self .engine .getData (self .idx )
7367
7468 def impl_gradient (self , result , x , functionId ):
75- print ("Function %i: copying gradient" % self .idx )
7669 for i in range (2 ):
7770 result [2 * self .idx + i ] = self .engine .getJac (self .idx , 2 * self .idx + i )
7871
@@ -158,7 +151,6 @@ def test_pool_fd(self):
158151 for j in range (2 ):
159152 jac [i ,2 * i + j ] = 2. * x [2 * i + j ]
160153 np .testing .assert_almost_equal (fd_pool_jac , jac , 5 )
161- print (engine .compute_counter )
162154 assert engine .compute_counter == 1 + len (x ) # simple rule: (f(x+h)-f(x))/h
163155 assert engine .jacobian_counter == 0
164156 engine .reset ()
0 commit comments