# HG changeset patch # User David Warde-Farley # Date 1285948073 14400 # Node ID 7af2a89bff3d16f1e51f83f11d6fee06c66f58e5 # Parent 71f3f22497fefb26e61376f3b2d40b3ecd9c2da0 Change tensor.log -> T.log since tensor was undefined symbol in this scope. diff -r 71f3f22497fe -r 7af2a89bff3d pylearn/formulas/costs.py --- 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))