code: def l1_loss(
      input: tf.Tensor, target=tf.Tensor, reduction: str = "none"
  ) -> tf.Tensor:
      """
      Computes the L1 loss.
  
      Parameters
      ----------
      input
         Input tensor.
      target
         Target tensor
      reduction
         Specifies the reduction to apply to the output: ``'none'`` | ``'mean'`` | ``'sum'``.
  
      Returns
      -------
      L1 loss.
      """
      loss = tf.abs(input - target)
  
      if reduction == "none":
          return loss
  
      if reduction == "mean":
          return tf.reduce_mean(loss)
  
      if reduction == "sum":
          return tf.reduce_sum(loss)
  
      raise ValueError(f"Reduction {reduction} not implemented.")
  
file_path: alibi/alibi/explainers/backends/tensorflow/cfrl_tabular.py
imports: from typing import List, Dict, Union
  import numpy
  import tensorflow
  from alibi.explainers.backends.cfrl_tabular import split_ohe, generate_condition
  from alibi.explainers.backends.tensorflow.cfrl_base import get_actor, get_critic, get_optimizer, data_generator, encode, decode, generate_cf, update_actor_critic, add_noise, to_numpy, to_tensor, set_seed, save_model, load_model, initialize_optimizers, initialize_actor_critic
label_desc: Use image node_id 3 for calling a global function with example usage: l1_loss(input, target, reduction) and returns: loss, tf, tf