view 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
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