class_docstr: Tests function update_target_variables.
class_docstr_tok: ["Tests","function","update_target_variables","."]
docstr: Tests incremental update of the target variables.
docstr_tok: ["Tests","incremental","update","of","the","target","variables","."]
code: def testIncrementalUpdate(self, use_locking):
      """Tests incremental update of the target variables."""
      target_variables = [tf.Variable(tf.random_normal(shape=[1, 2]))]
      source_variables = [tf.Variable(tf.random_normal(shape=[1, 2]))]
      updated = target_update_ops.update_target_variables(
          target_variables,
          source_variables,
          tau=0.1,
          use_locking=use_locking,
      )
  
      with self.test_session() as sess:
          sess.run(tf.global_variables_initializer())
          before_assign = sess.run(target_variables[0])
          sess.run(updated)
          results = sess.run([target_variables[0], source_variables[0]])
          self.assertAllClose(
              results[0], 0.1 * results[1] + 0.9 * before_assign
          )
  
file_path: trfl/trfl/target_update_ops_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import tensorflow.compat.v1
  from trfl import target_update_ops
label_desc: Use image node_id 2 for calling the UpdateTargetVariablesTest obj's underlying member method code with example usage: obj.testIncrementalUpdate(use_locking) without return types