changeset 448:0961d4b56ec5

Added some documentation
author Joseph Turian <turian@gmail.com>
date Wed, 03 Sep 2008 17:08:54 -0400
parents 0392b666320a
children 2bb67e978c28
files cost.py nnet_ops.py
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/cost.py	Wed Aug 27 17:08:33 2008 -0400
+++ b/cost.py	Wed Sep 03 17:08:54 2008 -0400
@@ -11,4 +11,7 @@
     return T.mean(T.sqr(target - output), axis)
 
 def cross_entropy(target, output, axis=1):
+    """
+    @todo: This is essentially duplicated as nnet_ops.binary_crossentropy
+    """
     return -T.mean(target * T.log(output) + (1 - target) * T.log(1 - output), axis=axis)
--- a/nnet_ops.py	Wed Aug 27 17:08:33 2008 -0400
+++ b/nnet_ops.py	Wed Sep 03 17:08:54 2008 -0400
@@ -610,6 +610,7 @@
     Compute the crossentropy of binary output wrt binary target.
     @note: We do not sum, crossentropy is computed by component.
     @todo: Rewrite as a scalar, and then broadcast to tensor.
+    @todo: This is essentially duplicated as cost.cross_entropy
     """
     return -(target * tensor.log(output) + (1 - target) * tensor.log(1 - output))