changeset 1295:7af2a89bff3d

Change tensor.log -> T.log since tensor was undefined symbol in this scope.
author David Warde-Farley <wardefar@iro.umontreal.ca>
date Fri, 01 Oct 2010 11:47:53 -0400
parents 71f3f22497fe
children b9bc9d5a08cc
files pylearn/formulas/costs.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/formulas/costs.py	Fri Oct 01 11:28:22 2010 -0400
+++ b/pylearn/formulas/costs.py	Fri Oct 01 11:47:53 2010 -0400
@@ -10,13 +10,13 @@
     """ Compute the crossentropy of binary output wrt binary target.
 
     .. math::
-                L_{CE} \equiv t\log(o) + (1-t)\log(1-o) 
+                L_{CE} \equiv t\log(o) + (1-t)\log(1-o)
 
     :type output: Theano variable
     :param output: Binary output or prediction :math:`\in[0,1]`
     :type target: Theano variable
     :param target: Binary target usually :math:`\in\{0,1\}`
     """
-    return -(target * tensor.log(output) + (1.0 - target) * tensor.log(1.0 - output))
+    return -(target * T.log(output) + (1.0 - target) * T.log(1.0 - output))