def categorical_crossentropy(output, target, from_logits=False):
    # Note: tf.nn.softmax_cross_entropy_with_logits
    # expects logits, Keras expects probabilities.
    if not from_logits:
        # scale preds so that the class probas of each sample sum to 1
        output /= tf.reduce_sum(output,
                                reduction_indices=len(output.get_shape()) - 1,
                                keep_dims=True)
        # manual computation of crossentropy
        output = tf.clip_by_value(output, tf.cast(_EPSILON, dtype=_FLOATX),
                                  tf.cast(1. - _EPSILON, dtype=_FLOATX))
        return - tf.reduce_sum(target * tf.log(output),
                               reduction_indices=len(output.get_shape()) - 1)
    else:
        return tf.nn.softmax_cross_entropy_with_logits(output, target)
Adds the given variable and value to the config addon.
dataset/ETHPy150Open fchollet/keras/keras/backend/tensorflow_backend.py/categorical_crossentropy--crossover with--dataset/ETHPy150Open cloudControl/cctrl/cctrl/app.py/AppController.addConfig