class_docstr: Common tests for noisy location-scale family of distributions.
class_docstr_tok: ["Common","tests","for","noisy","location-scale","family","of","distributions","."]
code: def test_variables_receive_gradients(self):
      loc = tf.Variable(1.0, dtype=tf.float32)
      log_scale = tf.Variable(0.0, dtype=tf.float32)
      with tf.GradientTape() as tape:
          dist = self.dist_cls(loc=loc, scale=tf.exp(log_scale))
          x = tf.random.normal([20])
          loss = -tf.reduce_mean(dist.log_prob(x))
      grads = tape.gradient(loss, [loc, log_scale])
      self.assertLen(grads, 2)
      self.assertNotIn(None, grads)
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow
  import tensorflow_probability
  from tensorflow_compression.python.distributions import deep_factorized
  from tensorflow_compression.python.distributions import round_adapters
label_desc: Use image node_id 3 for calling the LocationScaleTest obj's underlying member method code with example usage: obj.test_variables_receive_gradients() without return types