Loss or metric function: Mean absolute error.
Mathematically, mean absolute error is defined as: mean(abs(yPred - yTrue)), wherein the mean is applied over feature dimensions.
mean(abs(yPred - yTrue))
mean
const yTrue = tf.tensor2d([[0, 1], [0, 0], [2, 3]]);const yPred = tf.tensor2d([[0, 1], [0, 1], [-2, -3]]);const mse = tf.metrics.meanAbsoluteError(yTrue, yPred);mse.print(); Copy
const yTrue = tf.tensor2d([[0, 1], [0, 0], [2, 3]]);const yPred = tf.tensor2d([[0, 1], [0, 1], [-2, -3]]);const mse = tf.metrics.meanAbsoluteError(yTrue, yPred);mse.print();
Truth Tensor.
Prediction Tensor.
Mean absolute error Tensor.
Generated using TypeDoc
Loss or metric function: Mean absolute error.
Mathematically, mean absolute error is defined as:
mean(abs(yPred - yTrue))
, wherein themean
is applied over feature dimensions.