Mean Absolute Error - it is straight forward import numpy as np import tensorflow as tf y_true = np.float32([ 1 , 2 ] ) y_pred = np.float32([ 2 , 2 ] ) #loss = mean(abs(y_true - y_pred)) #np.abs will return the absolute values , nps.abs[-1] will return 1 loss_mae = tf.keras.losses.mean_absolute_error(y_true, y_pred) print (loss_mae.numpy()) print (np.mean(np. abs (y_true - y_pred))) print and verify 0.5 0.5 or u can run the code in colab using the link https://github.com/naveez-alagarsamy/matplotlib/blob/main/mean_absolute_error.ipynb reference - https://www.tensorflow.org/api_docs/python/tf/keras/metrics/mean_absolute_error
talks about machine learning ,IOT and web apps