changeset 1312:970082c8e9de

fix import problem
author Frederic Bastien <nouiz@nouiz.org>
date Wed, 06 Oct 2010 10:49:00 -0400
parents 431d0db69499
children 56278ca00b4d
files pylearn/formulas/activations.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 <r.pascanu@gmail.com>"
 
 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):