def binary_crossentropy(output, target):
 return (- ((target * tensor.log(output)) + ((1.0 - target) * tensor.log((1.0 - output)))))

def binary_crossentropy ( output , target ) : return ( - ( ( target * tensor . log ( output ) ) + ( ( 1.0 - target ) * tensor . log ( ( 1.0 - output ) ) ) ) )
computes the binary cross-entropy between predictions and targets .