When using Absolute Error in Gradient Descent, how to calculate the derivative?
The gradient of MAE is not continuous in $y_{pred} = y_{true}$ and therefore there is no defined (bounded, direction independent) derivative at that point.
Elsewhere you have -1, where  $y_{pred} &gt; y_{true}$ and +1 where  $y_{pred} &lt; y_{true}$
Usually frameworks like TensorFlow, Keras, etc... use an approximate derivative for that point.