docstr: Calculates the distances from references to perturbed using the Lp norm.
  
  Args:
      references: A batch of reference inputs.
      perturbed: A batch of perturbed inputs.
  
  Returns:
      A 1D tensor with the distances from references to perturbed.
docstr_tok: ["Calculates","the","distances","from","references","to","perturbed","using","the","Lp","norm",".","Args",":","references",":","A","batch","of","reference","inputs",".","perturbed",":","A","batch","of","perturbed","inputs",".","Returns",":","A","1D","tensor","with","the","distances","from","references","to","perturbed","."]
code: def __call__(self, references: T, perturbed: T) -> T:
      """Calculates the distances from references to perturbed using the Lp norm.
  
      Args:
          references: A batch of reference inputs.
          perturbed: A batch of perturbed inputs.
  
      Returns:
          A 1D tensor with the distances from references to perturbed.
      """
      (x, y), restore_type = ep.astensors_(references, perturbed)
      norms = ep.norms.lp(flatten(y - x), self.p, axis=-1)
      return restore_type(norms)
  
file_path: foolbox/foolbox/distances.py
imports: from abc import ABC, abstractmethod
  from typing import TypeVar
  import eagerpy
  from .devutils import flatten
  from .devutils import atleast_kd
label_desc: Use image node_id 4 for calling the LpDistance obj's underlying member method code with example usage: obj.__call__(references, perturbed) and returns: restore_type