changeset 535:a6068dedfbd6

Added squashfn
author Joseph Turian <turian@gmail.com>
date Wed, 19 Nov 2008 18:14:43 -0500
parents eaa5ad4089a1
children c6563c629984
files squashfn.py
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
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
+
+