class_docstr: Contains unit tests for the TransportNNDistanceComputer class. 
docstr: Unit test for the label mismatch penalty of an MLP. 
docstr_tok: ["Unit","test","for","the","label","mismatch","penalty","of","an","MLP","."]
code: def test_mlp_label_mismatch_penalties(self):
      """Unit test for the label mismatch penalty of an MLP."""
      self.report("Testing generation of label mismatches for a MLP. ")
      (
          mlp_layer_labels,
          label_mismatch_penalty,
      ) = otmann.get_mlp_layer_label_mismatch_penalties(
          self.non_assignment_penalty, "reg"
      )
      self.report(
          "mlp_layer_labels: %s" % ((str(mlp_layer_labels))),
          "test_result",
      )
      self.report(
          "mlp mismatch penalties: \n%s"
          % (str(np.round(label_mismatch_penalty, 3))),
          "test_result",
      )
      assert np.all(label_mismatch_penalty == label_mismatch_penalty.T)
      assert np.all(np.diag(label_mismatch_penalty) == 0)
  
imports: import numpy
  from .None import otmann
  from .unittest_neural_network import generate_cnn_architectures, generate_mlp_architectures
  from ..utils.ancillary_utils import get_list_of_floats_as_str
  from ..utils.base_test_class import BaseTestClass, execute_tests
label_desc: Use image node_id 3 for calling the TransportNNDistanceComputerTestCase obj's underlying member method code with example usage: obj.test_mlp_label_mismatch_penalties() without return types