#NEWLINE# def modified_huber_loss( y_true , y_pred ) : #NEWLINE# #INDENT# z = ( y_pred * y_true ) #NEWLINE# loss = ( ( - 4 ) * z ) #NEWLINE# loss [ ( z >= ( - 1 ) ) ] = ( ( 1 - z [ ( z >= ( - 1 ) ) ] ) ** 2 ) #NEWLINE# loss [ ( loss >= 1.0 ) ] = 0 #NEWLINE# return loss