Mercurial > pylearn
annotate squashfn.py @ 536:c6563c629984
Moved word preprocessing out
author | Joseph Turian <turian@gmail.com> |
---|---|
date | Thu, 20 Nov 2008 06:11:52 -0500 |
parents | a6068dedfbd6 |
children |
rev | line source |
---|---|
535 | 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 |