diff _nnet_ops.py @ 30:bf0145fa73e8

added c implementation for CrossentropySoftmax1Hot
author bergstrj@iro.umontreal.ca
date Fri, 11 Apr 2008 21:41:09 -0400
parents b63e8c0bf21b
children 8c2607f387e6
line wrap: on
line diff
--- a/_nnet_ops.py	Fri Apr 11 11:16:09 2008 -0400
+++ b/_nnet_ops.py	Fri Apr 11 21:41:09 2008 -0400
@@ -17,9 +17,10 @@
         numpy.random.seed(9999)
     def test0(self):
         y_idx = [0,1,3]
-        def output1(a):
-            return crossentropy_softmax_1hot(a, y_idx)[0:1]
-        TT.verify_grad(self, output1, [numpy.random.rand(3,4)])
+        def output1(a,b):
+            return crossentropy_softmax_1hot(a, b, y_idx)[0:1]
+        TT.verify_grad(self, output1, [numpy.random.rand(3,4),
+            numpy.random.rand(4)])