code: def test_evaluate_binary_classification_metrics(self):
      # multi-label binary classification model
      w = np.array([[4.0, 1.0, -5.0], [-3.0, 1.0, 2.0]])
      x0 = np.array([[2.0, 3.0]])
      y0 = np.array([[0.0, 1.0, 1.0]])
      inputs = {"feature": tf.constant(x0), "label": tf.constant(y0)}
      model = build_linear_keras_sequential_model(
          input_shape=(2,), weights=w
      )
      model.add(tf.keras.layers.Lambda(tf.sigmoid))
  
      adv_model = adversarial_regularization.AdversarialRegularization(
          model
      )
      adv_model.compile(
          optimizer=tf.keras.optimizers.SGD(0.1),
          loss="squared_hinge",
          metrics=["accuracy", "ce"],
      )
      metrics_values = adv_model.evaluate(inputs, steps=1)
      results = dict(zip(adv_model.metrics_names, metrics_values))
  
      y_hat = 1.0 / (
          1.0 + np.exp(-np.dot(x0, w))
      )  # [[0.26894, 0.99331, 0.01799]]
      accuracy = np.mean(
          np.sign(y_hat - 0.5) == np.sign(y0 - 0.5)
      )  # (1+1+0) / 3
      cross_entropy = np.mean(
          y0 * -np.log(y_hat) + (1 - y0) * -np.log(1 - y_hat)
      )
  
      self.assertIn("binary_accuracy", results)
      self.assertIn("binary_crossentropy", results)
      self.assertAllClose(accuracy, results["binary_accuracy"])
      self.assertAllClose(cross_entropy, results["binary_crossentropy"])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import os
  from absl.testing import parameterized
  import neural_structured_learning.configs
  from neural_structured_learning.keras import adversarial_regularization
  import numpy
  import tensorflow
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 17 for calling the AdversarialRegularizationTest obj's underlying member method code with example usage: obj.test_evaluate_binary_classification_metrics() without return types