# HG changeset patch # User Frederic Bastien # Date 1286376540 14400 # Node ID 970082c8e9de1b7e1f58a043f736a5eb03d3d0ef # Parent 431d0db694998e7d886165c4c15c7f06fa96ac73 fix import problem diff -r 431d0db69499 -r 970082c8e9de pylearn/formulas/activations.py --- a/pylearn/formulas/activations.py Wed Oct 06 10:39:54 2010 -0400 +++ b/pylearn/formulas/activations.py Wed Oct 06 10:49:00 2010 -0400 @@ -9,6 +9,8 @@ __contact__ = "Razvan Pascanu " import theano +from theano import tensor + import tags @tags.tags('activation','softsign') @@ -25,7 +27,7 @@ :return: tensor obtained after applying the softsign function """ - return input/(1.0 + T.abs_(input)) + return input/(1.0 + tensor.abs_(input)) @tags.tags('activation','softsign','abs') def abssoftsign_act(input): @@ -42,7 +44,7 @@ :return: tensor obtained by taking the absolute value of softsign of the input """ - return T.abs_(input)/(1.0 + T.abs_(input)) + return tensor.abs_(input)/(1.0 + tensor.abs_(input)) @tags.tags('activation','rectifier') @@ -83,7 +85,7 @@ :rtype: Theano variable :return: tensor obtained by applying softsign on the input """ - return theano.tensor.nnet.softplus(input) + return tensor.nnet.softplus(input) @tags.tags('activation','abs') def abs_act(input):