changeset 530:844bad76459c

replaced the use of removed function compile.eval_outputs with theano.function.
author Frederic Bastien <bastienf@iro.umontreal.ca>
date Mon, 17 Nov 2008 14:18:28 -0500
parents 4e3629a894fa
children 90a76a8238e8
files _test_onehotop.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/_test_onehotop.py	Mon Nov 17 14:15:19 2008 -0500
+++ b/_test_onehotop.py	Mon Nov 17 14:18:28 2008 -0500
@@ -3,7 +3,7 @@
 import unittest
 from theano import compile
 from theano import gradient
-
+from theano import function
 from theano.tensor import as_tensor
 
 import random
@@ -14,8 +14,8 @@
         x = as_tensor([3, 2, 1])
         y = as_tensor(5)
         o = one_hot(x, y)
-        y = compile.eval_outputs([o])
-        self.failUnless(numpy.all(y == numpy.asarray([[0, 0, 0, 1, 0], [0, 0, 1, 0, 0], [0, 1, 0, 0, 0]])))
+        f = function([],o)
+        self.failUnless(numpy.all(f() == numpy.asarray([[0, 0, 0, 1, 0], [0, 0, 1, 0, 0], [0, 1, 0, 0, 0]])))
 
 if __name__ == '__main__':
     unittest.main()