class_docstr: Implements APPO loss / update logic on top of ImpalaTfLearner.
class_docstr_tok: ["Implements","APPO","loss","\/","update","logic","on","top","of","ImpalaTfLearner","."]
code: def _update_module_target_networks(
      self,
      module_id: ModuleID,
      config: APPOConfig,
  ) -> None:
      module = self.module[module_id]
  
      target_current_network_pairs = module.get_target_network_pairs()
      for (
          target_network,
          current_network,
      ) in target_current_network_pairs:
          for old_var, current_var in zip(
              target_network.variables, current_network.variables
          ):
              updated_var = (
                  config.tau * current_var
                  + (1.0 - config.tau) * old_var
              )
              old_var.assign(updated_var)
  
file_path: ray/rllib/algorithms/appo/tf/appo_tf_learner.py
imports: from typing import Any, Dict
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.algorithms.appo.appo import APPOConfig, LEARNER_RESULTS_CURR_KL_COEFF_KEY, LEARNER_RESULTS_KL_KEY, OLD_ACTION_DIST_LOGITS_KEY
  from ray.rllib.algorithms.appo.appo_learner import AppoLearner
  from ray.rllib.algorithms.impala.tf.vtrace_tf_v2 import make_time_major, vtrace_tf2
  from ray.rllib.core.learner.learner import POLICY_LOSS_KEY, VF_LOSS_KEY, ENTROPY_KEY
  from ray.rllib.core.learner.tf.tf_learner import TfLearner
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.framework import try_import_tf
  from ray.rllib.utils.nested_dict import NestedDict
  from ray.rllib.utils.typing import ModuleID, TensorType
label_desc: Use image node_id 2 for calling the APPOTfLearner obj's underlying member method code with example usage: obj._update_module_target_networks(module_id, config) without return types