class_docstr: Test class for utils_tf
class_docstr_tok: ["Test","class","for","utils_tf"]
code: def test_kl_with_logits(self):
      p_logits = tf.placeholder(tf.float32, shape=(100, 20))
      q_logits = tf.placeholder(tf.float32, shape=(100, 20))
      p_logits_np = np.random.normal(0, 10, size=(100, 20))
      q_logits_np = np.random.normal(0, 10, size=(100, 20))
      kl_div_tf = self.sess.run(
          utils_tf.kl_with_logits(p_logits, q_logits),
          feed_dict={p_logits: p_logits_np, q_logits: q_logits_np},
      )
      kl_div_ref = numpy_kl_with_logits(p_logits_np, q_logits_np)
      self.assertClose(kl_div_ref, kl_div_tf)
  
file_path: cleverhans/cleverhans_v3.1.0/tests_tf/test_utils_tf.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import numpy
  import tensorflow
  from cleverhans import utils_tf
  from cleverhans.devtools.checks import CleverHansTest
label_desc: Use image node_id 4 for calling the TestUtilsTF obj's underlying member method code with example usage: obj.test_kl_with_logits() without return types