diff _nnet_ops.py @ 69:8c2607f387e6

added softplus, elaborated sigmoid
author James Bergstra <bergstrj@iro.umontreal.ca>
date Mon, 21 Apr 2008 15:23:49 -0400
parents bf0145fa73e8
children 76e5c0f37165
line wrap: on
line diff
--- a/_nnet_ops.py	Fri Apr 18 03:49:17 2008 -0400
+++ b/_nnet_ops.py	Mon Apr 21 15:23:49 2008 -0400
@@ -11,6 +11,11 @@
     def test_elemwise(self):
         TT.verify_grad(self, Sigmoid, [numpy.random.rand(3,4)])
 
+class T_softplus(unittest.TestCase):
+    def setUp(self):
+        numpy.random.seed(9999)
+    def test_elemwise(self):
+        TT.verify_grad(self, Softplus, [numpy.random.rand(3,4)])
 
 class T_CrossentropySoftmax1Hot(unittest.TestCase):
     def setUp(self):