Ejemplo n.º 1
0
def CrossEntropyLossWithLogSoftmax():
    """Mean prediction-target cross-entropy for multiclass classification."""
    return cb.Serial(core.LogSoftmax(),
                     _CrossEntropy(),
                     _WeightedMean(),
                     name='CrossEntropyLossWithLogSoftmax',
                     sublayers_to_print=[])
Ejemplo n.º 2
0
def CrossEntropyLossWithLogSoftmax():
    """Mean prediction-target cross entropy for multiclass classification."""
    return cb.Serial(core.LogSoftmax(),
                     CrossEntropyLoss(),
                     name='CrossEntropyLoss')