docstr: Tests that min/max variance conditions are satisfied.
docstr_tok: ["Tests","that","min\/max","variance","conditions","are","satisfied","."]
code: def testVarianceBoundaryConditions(self):
      """Tests that min/max variance conditions are satisfied."""
      batch_size = 3
      num_state_dims = 5
      min_variance = 1.0
      max_variance = 2.0
      eps = 0.0001
      states = tf.random.uniform([batch_size, num_state_dims])
      network = heteroscedastic_q_network.HeteroscedasticQNetwork(
          input_tensor_spec=tensor_spec.TensorSpec(
              [num_state_dims], tf.float32
          ),
          action_spec=tensor_spec.BoundedTensorSpec(
              [1], tf.int32, 0, 1
          ),
          min_variance=min_variance,
          max_variance=max_variance,
      )
      log_variances = network(states)[0].log_variance
      self.evaluate(tf.compat.v1.global_variables_initializer())
      self.assertAllGreater(log_variances, math.log(min_variance) - eps)
      self.assertAllLess(log_variances, math.log(max_variance) + eps)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import gin
  import tensorflow
  from tf_agents.bandits.networks import heteroscedastic_q_network
  from tf_agents.specs import tensor_spec
label_desc: Use image node_id 13 for calling the SingleObservationSingleActionTest obj's underlying member method code with example usage: obj.testVarianceBoundaryConditions() without return types