comparison squashfn.py @ 535:a6068dedfbd6

Added squashfn
author Joseph Turian <turian@gmail.com>
date Wed, 19 Nov 2008 18:14:43 -0500
parents
children
comparison
equal deleted inserted replaced
534:eaa5ad4089a1 535:a6068dedfbd6
1
2 def squashfn(str):
3 if str == "sigmoid":
4 import theano.tensor.nnet as nnet
5 return nnet.sigmoid
6 elif str == "tanh":
7 import theano.tensor as t
8 return t.tanh
9 elif str == "softsign":
10 from theano.sandbox.softsign import softsign
11 return softsign
12 else: assert 0
13
14