comparison nnet_ops.py @ 449:2bb67e978c28

updated doc
author Joseph Turian <turian@gmail.com>
date Wed, 03 Sep 2008 17:14:49 -0400
parents 0961d4b56ec5
children 34acf8db186d
comparison
equal deleted inserted replaced
448:0961d4b56ec5 449:2bb67e978c28
609 """ 609 """
610 Compute the crossentropy of binary output wrt binary target. 610 Compute the crossentropy of binary output wrt binary target.
611 @note: We do not sum, crossentropy is computed by component. 611 @note: We do not sum, crossentropy is computed by component.
612 @todo: Rewrite as a scalar, and then broadcast to tensor. 612 @todo: Rewrite as a scalar, and then broadcast to tensor.
613 @todo: This is essentially duplicated as cost.cross_entropy 613 @todo: This is essentially duplicated as cost.cross_entropy
614 @warning: OUTPUT and TARGET are reversed in cost.cross_entropy
614 """ 615 """
615 return -(target * tensor.log(output) + (1 - target) * tensor.log(1 - output)) 616 return -(target * tensor.log(output) + (1 - target) * tensor.log(1 - output))
616 617
617 618
618 619