# HG changeset patch # User Joseph Turian # Date 1220476489 14400 # Node ID 2bb67e978c28a4f6d49020b8d0e7dd8c942b94e2 # Parent 0961d4b56ec50bd7ffdee640e364962aaea1de78 updated doc diff -r 0961d4b56ec5 -r 2bb67e978c28 cost.py --- a/cost.py Wed Sep 03 17:08:54 2008 -0400 +++ b/cost.py Wed Sep 03 17:14:49 2008 -0400 @@ -13,5 +13,6 @@ def cross_entropy(target, output, axis=1): """ @todo: This is essentially duplicated as nnet_ops.binary_crossentropy + @warning: OUTPUT and TARGET are reversed in nnet_ops.binary_crossentropy """ return -T.mean(target * T.log(output) + (1 - target) * T.log(1 - output), axis=axis) diff -r 0961d4b56ec5 -r 2bb67e978c28 nnet_ops.py --- a/nnet_ops.py Wed Sep 03 17:08:54 2008 -0400 +++ b/nnet_ops.py Wed Sep 03 17:14:49 2008 -0400 @@ -611,6 +611,7 @@ @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 + @warning: OUTPUT and TARGET are reversed in cost.cross_entropy """ return -(target * tensor.log(output) + (1 - target) * tensor.log(1 - output))