code: def test_evaluate_classification_metrics(self):
      # multi-class logistic regression 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([[1]])
      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.Softmax())
  
      adv_model = adversarial_regularization.AdversarialRegularization(
          model
      )
      adv_model.compile(
          optimizer=tf.keras.optimizers.SGD(0.1),
          loss="sparse_categorical_crossentropy",
          metrics=["accuracy", "ce"],
      )
      metrics_values = adv_model.evaluate(inputs, steps=1)
      results = dict(zip(adv_model.metrics_names, metrics_values))
  
      logit = np.dot(x0, w)  # [[-1.,  5., -4.]]
      accuracy = np.mean(np.argmax(logit, axis=-1) == y0)
      cross_entropy = np.log(np.sum(np.exp(logit))) - np.reshape(
          logit[:, y0], ()
      )
  
      self.assertIn("sparse_categorical_accuracy", results)
      self.assertIn("sparse_categorical_crossentropy", results)
      self.assertAllClose(
          accuracy, results["sparse_categorical_accuracy"]
      )
      self.assertAllClose(
          cross_entropy, results["sparse_categorical_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 18 for calling the AdversarialRegularizationTest obj's underlying member method code with example usage: obj.test_evaluate_classification_metrics() without return types