#NEWLINE# def log_losses( y , t , eps = 1e-15 ) : #NEWLINE# #INDENT# '\n    cross entropy loss per example, summed over classes\n    ' #NEWLINE# y = T . clip ( t , eps , ( 1 - eps ) ) #NEWLINE# losses = ( - T . sum ( ( t * T . log ( y ) ) , axis = 1 ) ) #NEWLINE# return losses