code: def testHyperParamDTypeConversion(self):
      parameters = [tf.Variable([1.0, 2.0]), tf.Variable([3.0, 4.0])]
      updates = [tf.constant([5.0, 5.0]), tf.constant([3.0, 3.0])]
      dtype = tf.float32 if self.primary_device == "TPU" else tf.float64
      learning_rate = tf.Variable(0.001, dtype=dtype)
      beta1 = tf.Variable(0.9, dtype=dtype)
      beta2 = tf.Variable(0.999, dtype=dtype)
      epsilon = tf.Variable(1e-8, dtype=dtype)
      optimizer = self.make_optimizer(
          learning_rate=learning_rate,
          beta1=beta1,
          beta2=beta2,
          epsilon=epsilon,
      )
      optimizer.apply(updates, parameters)
      self.assertAllClose(
          [[0.999, 1.999], [2.999, 3.999]],
          [x.numpy() for x in parameters],
          rtol=1e-4,
      )
  
file_path: sonnet/sonnet/src/optimizers/adam_test.py
imports: from sonnet.src import test_utils
  from sonnet.src.optimizers import adam
  from sonnet.src.optimizers import optimizer_tests
  import tensorflow
label_desc: Use image node_id 5 for calling the AdamTest obj's underlying member method code with example usage: obj.testHyperParamDTypeConversion() without return types