class_docstr: A distance between neural networks based on solving a transportation problem. 
docstr: Evaluates the distances between two networks x1 and x2. dist_type is a
  string with options 'lp' or 'emd'.
docstr_tok: ["Evaluates","the","distances","between","two","networks","x1","and","x2",".","dist_type","is","a","string","with","options","'lp","'","or","'emd","'","."]
code: def evaluate_single(
      self,
      x1,
      x2,
      mislabel_coeffs=None,
      struct_coeffs=None,
      dist_type=None,
  ):
      """Evaluates the distances between two networks x1 and x2. dist_type is a
      string with options 'lp' or 'emd'.
      """
      # pylint: disable=arguments-differ
      #  Preprocessing
      mislabel_coeffs = (
          mislabel_coeffs
          if mislabel_coeffs is not None
          else self.dflt_mislabel_coeffs
      )
      struct_coeffs = (
          struct_coeffs
          if struct_coeffs is not None
          else self.dflt_struct_coeffs
      )
      dist_type = (
          dist_type if dist_type is not None else self.dflt_dist_type
      )
      if not hasattr(mislabel_coeffs, "__len__"):
          mislabel_coeffs = [mislabel_coeffs]
      if not hasattr(struct_coeffs, "__len__"):
          struct_coeffs = [struct_coeffs]
      assert len(mislabel_coeffs) == len(struct_coeffs)
      # Compute the types of distances we need to compute.
      types_of_distances = dist_type.split("-")
      # Create data for the transportation problem.
      total_wt_1 = sum(x1.layer_masses)
      total_wt_2 = sum(x2.layer_masses)
      supplies = np.append(x1.layer_masses, total_wt_2)
      demands = np.append(x2.layer_masses, total_wt_1)
      # Get the mislabel and structural cost matrices
      mislabel_cost_matrix = self.get_mislabel_cost_matrix(x1, x2)
      struct_cost_matrix = self.get_struct_cost_matrix(x1, x2)
      # Go through each coefficient and repeat
      ret = []
      for coeff_idx in range(len(mislabel_coeffs)):
          curr_ot_cost_matrix = self.get_ot_cost_matrix(
              mislabel_cost_matrix,
              struct_cost_matrix,
              mislabel_coeffs[coeff_idx],
              struct_coeffs[coeff_idx],
              self.non_assignment_penalty,
          )
          _, min_val, emd = opt_transport(
              supplies, demands, curr_ot_cost_matrix
          )
          # Below, emd and lp-norm-by-max (or min, sum) are not distances.
          for dt in types_of_distances:
              if dt == "lp":
                  ret.append(min_val)
              elif dt == "emd":
                  ret.append(emd)
              elif dt == "lp_norm_by_max":
                  dist_lp_norm = min_val / max(total_wt_1, total_wt_2)
                  ret.append(dist_lp_norm)
              elif dt == "log_lp":
                  ret.append(np.log(1 + min_val))
              else:
                  raise ValueError(
                      "Unknown dist_type '%s'." % (dist_type)
                  )
      return ret
  
imports: import numpy
  from .None import neural_network
  from ..gp.kernel import ExpSumOfDistsKernel, SumOfExpSumOfDistsKernel
  from ..utils.oper_utils import opt_transport
label_desc: Use image node_id 7 for calling the OTMANNDistanceComputer obj's underlying member method code with example usage: obj.evaluate_single(x1, x2, mislabel_coeffs, struct_coeffs, dist_type) and returns: ret