• Loss or metric function: Mean squared error.

    const yTrue = tf.tensor2d([[0, 1], [3, 4]]);
    const yPred = tf.tensor2d([[0, 1], [-3, -4]]);
    const mse = tf.metrics.meanSquaredError(yTrue, yPred);
    mse.print();

    Aliases: tf.metrics.MSE, tf.metrics.mse.

    Parameters

    • yTrue: Tensor<Rank>

      Truth Tensor.

    • yPred: Tensor<Rank>

      Prediction Tensor.

    Returns Tensor

    Mean squared error Tensor.

    Doc

Generated using TypeDoc