code: def test_specialized_input_output_metrics(self):
      with self.test_session():
          for metric in all_specialized_input_output_metrics:
              if metric == categorical_accuracy:
                  y_true = tf.convert_to_tensor(
                      np.random.randint(0, 1, (6, 7))
                  )
                  y_pred = tf.convert_to_tensor(
                      np.random.randint(0, 7, (6,))
                  )
                  self.assertEqual(
                      metric(y_true, y_pred).eval().shape, ()
                  )
              elif metric == sparse_categorical_crossentropy:
                  y_true = tf.convert_to_tensor(
                      np.random.randint(0, 5, (6))
                  )
                  y_pred = tf.random_normal([6, 7])
                  self.assertEqual(
                      metric(y_true, y_pred).eval().shape, ()
                  )
              elif metric == kl_divergence:
                  y_true = tf.nn.softmax(tf.random_normal([6]))
                  y_pred = tf.nn.softmax(tf.random_normal([6]))
                  self.assertEqual(
                      metric(y_true, y_pred).eval().shape, ()
                  )
              else:
                  raise NotImplementedError()
  
file_path: edward/tests/criticisms/metrics_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  from edward.criticisms.evaluate import *
label_desc: Use image node_id 5 for calling the test_metrics_class obj's underlying member method code with example usage: obj.test_specialized_input_output_metrics() without return types