class_docstr: A trainer for the DQN algorithm and its variants.
  
  Configures optimizers, builds the losses and train functions for the
  Q-learning based algorithm variants. Supports MaxQ and SARSA style
  TD-learning under both, standard and batch-constrained q-learning.
  During training, updates CPE metrics estimators.
  
  Attributes:
      double_q_learning: a boolean flag whether to use double-q learning.
      minibatch_size: an int number of samples per minibatch.
      minibatches_per_step: an int number of minibatch updates per step.
      q_network: a network object mapping states to q-values of all actions.
      q_network_target: a copy of q-network for training stability used in
          estimating q-values targets.
      q_network_optimizer: an optimizer object for training q-network.
      bcq: a config file for batch-constrained q-learning (BCQ).
      bcq_imitator: if using batch-constrained q-learning, the behavior
          policy used for BCQ training.
      all_action_scores: a torch tensor containing q-network
              predictions from the current states.
docstr: Initializes networks optimizers.
  
  Initializes and returns the reward, q_network and the cpe networks
  optimizers. Also initializes soft updates of target networks from
  corresponding source networks.
  
  Returns:
      A list of initialized optimizer objects.
docstr_tok: ["Initializes","networks","optimizers",".","Initializes","and","returns","the","reward",",","q_network","and","the","cpe","networks","optimizers",".","Also","initializes","soft","updates","of","target","networks","from","corresponding","source","networks",".","Returns",":","A","list","of","initialized","optimizer","objects","."]
code: def configure_optimizers(self):
      """Initializes networks optimizers.
  
      Initializes and returns the reward, q_network and the cpe networks
      optimizers. Also initializes soft updates of target networks from
      corresponding source networks.
  
      Returns:
          A list of initialized optimizer objects.
      """
      optimizers = []
      target_params = list(self.q_network_target.parameters())
      source_params = list(self.q_network.parameters())
  
      optimizers.append(
          self.q_network_optimizer.make_optimizer_scheduler(
              self.q_network.parameters()
          )
      )
  
      if self.calc_cpe_in_training:
          (
              cpe_target_params,
              cpe_source_params,
              cpe_optimizers,
          ) = self._configure_cpe_optimizers()
          target_params += cpe_target_params
          source_params += cpe_source_params
          optimizers += cpe_optimizers
  
      optimizers.append(
          SoftUpdate.make_optimizer_scheduler(
              target_params, source_params, tau=self.tau
          )
      )
  
      return optimizers
  
imports: import logging
  from typing import List, Optional, Tuple
  import reagent.core.types
  import torch
  from reagent.core.configuration import resolve_defaults
  from reagent.core.dataclasses import dataclass, field
  from reagent.core.parameters import EvaluationParameters, RLParameters
  from reagent.optimizer import Optimizer__Union, SoftUpdate
  from reagent.training.dqn_trainer_base import DQNTrainerBaseLightning
  from reagent.training.imitator_training import get_valid_actions_from_imitator
label_desc: Use image node_id 2 for calling the DQNTrainer obj's underlying member method code with example usage: obj.configure_optimizers() and returns: optimizers