code: def test_lower_bound_info_nce(self):
      # Numerical test with correlated gaussian as random variables.
      info_nce_bound = self.evaluate(
          mi.lower_bound_info_nce(self.conditional_scores)
      )
      self.assertAllInRange(
          info_nce_bound,
          lower_bound=self.theoretical_mi - LOWER_BOUND_MIN_GAP,
          upper_bound=self.theoretical_mi + LOWER_BOUND_MAX_GAP,
      )
  
      # Check the masked against none masked version
      info_nce_bound_1 = self.evaluate(
          mi.lower_bound_info_nce(self.scores)
      )
      positive_mask = np.eye(self.scores.shape[0], self.scores.shape[1])
      info_nce_bound_2 = self.evaluate(
          mi.lower_bound_info_nce(
              self.scores, positive_mask, validate_args=True
          )
      )
      self.assertAllClose(info_nce_bound_1, info_nce_bound_2)
  
      # Check batched against none batched version
      info_nce_bound_3 = self.evaluate(
          mi.lower_bound_info_nce(
              tf.tile(self.scores[None, :, :], [3, 1, 1])
          )
      )
      self.assertAllClose(
          info_nce_bound_3,
          self.evaluate(tf.tile(info_nce_bound_1[tf.newaxis,], [3])),
      )
  
file_path: probability/tensorflow_probability/python/vi/mutual_information_test.py
imports: import numpy
  import scipy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.vi import mutual_information
label_desc: Use image node_id 6 for calling the MutualInformationTest obj's underlying member method code with example usage: obj.test_lower_bound_info_nce() without return types