• Binary crossentropy metric function.

    Example:

    const x = tf.tensor2d([[0], [1], [1], [1]]);
    const y = tf.tensor2d([[0], [0], [0.5], [1]]);
    const crossentropy = tf.metrics.binaryCrossentropy(x, y);
    crossentropy.print();

    Parameters

    • yTrue: Tensor<Rank>

      Binary Tensor of truth.

    • yPred: Tensor<Rank>

      Binary Tensor of prediction, probabilities for the 1 case.

    Returns Tensor

    Accuracy Tensor.

    Doc

Generated using TypeDoc