# HG changeset patch # User Olivier Delalleau # Date 1245855235 14400 # Node ID e768674aa51f2cd19b232739782c374e17647967 # Parent 2c159439c47ce790add1f87b2fa53285ca2a2dd9 Fixed some SGD tests diff -r 2c159439c47c -r e768674aa51f pylearn/algorithms/tests/test_sgd.py --- a/pylearn/algorithms/tests/test_sgd.py Sun Jun 21 20:16:23 2009 -0400 +++ b/pylearn/algorithms/tests/test_sgd.py Wed Jun 24 10:53:55 2009 -0400 @@ -14,7 +14,7 @@ c = m.step_cost(3.0) #print c[0], m.y - assert c[0] < 1.0e-5 + assert c < 1.0e-5 assert abs(m.y - (1.0 / 3)) < 1.0e-4 def test_sgd_stepsize_variable(): @@ -33,7 +33,7 @@ c = m.step_cost(3.0) # print c, m.y - assert c[0] < 1.0e-5 + assert c < 1.0e-5 assert abs(m.y - (1.0 / 3)) < 1.0e-4 @@ -63,7 +63,7 @@ c = m.step_cost(3.0) # print c, m.y - assert c[0] < 1.0e-5 + assert c < 1.0e-5 assert abs(m.y - (1.0 / 3)) < 1.0e-4 if __name__ == '__main__':