import torch


def l1_loss(D, G, real_data, generated_data, losses, options):
  """
  Performs the L1 loss between the generated data and the real data.

  It is expected that both `real_data` and `generated_data` are of the same shape.
  """
  return torch.nn.L1Loss()(generated_data, real_data)