changeset 434:0f366ecb11ee

log2->log in cost
author Olivier Breuleux <breuleuo@iro.umontreal.ca>
date Mon, 04 Aug 2008 16:21:59 -0400
parents 319bf28c2dd5
children eac0a7d44ff0
files cost.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/cost.py	Fri Jul 11 15:33:27 2008 -0400
+++ b/cost.py	Mon Aug 04 16:21:59 2008 -0400
@@ -8,4 +8,4 @@
     return T.mean(T.sqr(target - output), axis)
 
 def cross_entropy(target, output, axis=1):
-    return -T.mean(target * T.log2(output) + (1 - target) * T.log2(1 - output), axis=axis)
+    return -T.mean(target * T.log(output) + (1 - target) * T.log(1 - output), axis=axis)