#NEWLINE# def entropy( y , y_pred ) : #NEWLINE# #INDENT# y_pred = T . clip ( y_pred , epsilon , ( 1.0 - epsilon ) ) #NEWLINE# L = ( - ( ( y * T . log ( y_pred ) ) + ( ( 1 - L ) * T . log ( ( 1 - y_pred ) ) ) ) ) #NEWLINE# return T . mean ( L )