# HG changeset patch # User Joseph Turian # Date 1227136483 18000 # Node ID a6068dedfbd6dfe7d89de37dc52d160d7cdc61ed # Parent eaa5ad4089a189b1470dab5042f91029bab9e07d Added squashfn diff -r eaa5ad4089a1 -r a6068dedfbd6 squashfn.py --- /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 + +