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