Mercurial > pylearn
view 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 source
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