code: def mae(expected, predicted):
      """
      Mean absolute error.
  
      .. math::
          mae(t, o) = mean(\\left| t - o \\right|)
  
      where :math:`t=expected` and :math:`o=predicted`
  
      Parameters
      ----------
      {error_function.expected}
      {error_function.predicted}
  
      Returns
      -------
      {error_function.Returns}
      """
      return tf.reduce_mean(tf.abs(expected - predicted))
  
file_path: neupy/neupy/algorithms/gd/objectives.py
imports: from __future__ import division
  import tensorflow
  from neupy.core.docs import shared_docs
  from neupy.utils import asfloat, function_name_scope
label_desc: Use image node_id 4 for calling a global function with example usage: mae(expected, predicted) and returns: tf