changeset 780:e768674aa51f

Fixed some SGD tests
author Olivier Delalleau <delallea@iro>
date Wed, 24 Jun 2009 10:53:55 -0400
parents 2c159439c47c
children b6670cb57101 ba068f7d4d3e
files pylearn/algorithms/tests/test_sgd.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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__':