#NEWLINE# def binary_crossentropy( output , target , from_logits = False ) : #NEWLINE# #INDENT# if output : #NEWLINE# #INDENT# output = T . nnet . sigmoid ( output ) #NEWLINE# #UNINDENT# output = T . clip ( output , _EPSILON , ( 1.0 - _EPSILON ) ) #NEWLINE# return T . nnet . binary_crossentropy ( output , target )