def cross_entropy_cost( outputs, targets, derivative=False, epsilon=1e-11 ):
    # Prevent overflow
    outputs = np.clip(outputs, epsilon, 1 - epsilon)
    divisor = np.maximum(outputs * (1 - outputs), epsilon)
    
    if derivative:
        return (outputs - targets) / divisor
    else:
        return -np.sum(targets * np.log( outputs ) + (1 - targets) * np.log(1 - outputs))
#end cost function
Return the date corresponding to the proleptic Gregorian ordinal.
dataset/ETHPy150Open jorgenkg/python-neural-network/src/cost_functions.py/cross_entropy_cost--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/zope/interface/common/idatetime.py/IDateClass.fromordinal