comparison nnet_ops.py @ 383:344d1f874af7

Small fix
author Joseph Turian <turian@gmail.com>
date Tue, 08 Jul 2008 01:59:42 -0400
parents b4efd192d880
children 43d9aa93934e
comparison
equal deleted inserted replaced
382:b4efd192d880 383:344d1f874af7
384 """ 384 """
385 Compute the crossentropy of binary output wrt binary target. 385 Compute the crossentropy of binary output wrt binary target.
386 @note: We do not sum, crossentropy is computed by component. 386 @note: We do not sum, crossentropy is computed by component.
387 @todo: Rewrite as a scalar, and then broadcast to tensor. 387 @todo: Rewrite as a scalar, and then broadcast to tensor.
388 """ 388 """
389 return -(target * t.log(output) + (1 - target) * t.log(1 - output)) 389 return -(target * tensor.log(output) + (1 - target) * tensor.log(1 - output))