diff squashfn.py @ 535:a6068dedfbd6

Added squashfn
author Joseph Turian <turian@gmail.com>
date Wed, 19 Nov 2008 18:14:43 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/squashfn.py	Wed Nov 19 18:14:43 2008 -0500
@@ -0,0 +1,14 @@
+
+def squashfn(str):
+    if str == "sigmoid":
+        import theano.tensor.nnet as nnet
+        return nnet.sigmoid
+    elif str == "tanh":
+        import theano.tensor as t
+        return t.tanh
+    elif str == "softsign":
+        from theano.sandbox.softsign import softsign
+        return softsign
+    else: assert 0
+
+