class_docstr: Relative Entropy Policy Search.
  
  References
  ----------
  [1] J. Peters, K. Mulling, and Y. Altun, "Relative Entropy Policy Search,"
      Artif. Intell., pp. 1607-1612, 2008.
  
  Example:
      $ python garage/examples/tf/reps_gym_cartpole.py
  
  Args:
      env_spec (EnvSpec): Environment specification.
      policy (garage.tf.policies.StochasticPolicy): Policy.
      baseline (garage.tf.baselines.Baseline): The baseline.
      sampler (garage.sampler.Sampler): Sampler.
      scope (str): Scope for identifying the algorithm.
          Must be specified if running multiple algorithms
          simultaneously, each using different environments
          and policies.
      discount (float): Discount.
      gae_lambda (float): Lambda used for generalized advantage
          estimation.
      center_adv (bool): Whether to rescale the advantages
          so that they have mean 0 and standard deviation 1.
      positive_adv (bool): Whether to shift the advantages
          so that they are always positive. When used in
          conjunction with center_adv the advantages will be
          standardized before shifting.
      fixed_horizon (bool): Whether to fix horizon.
      epsilon (float): Dual func parameter.
      l2_reg_dual (float): Coefficient for dual func l2 regularization.
      l2_reg_loss (float): Coefficient for policy loss l2 regularization.
      optimizer (object): The optimizer of the algorithm. Should be the
          optimizers in garage.tf.optimizers.
      optimizer_args (dict): Arguments of the optimizer.
      dual_optimizer (object): Dual func optimizer.
      dual_optimizer_args (dict): Arguments of the dual optimizer.
      name (str): Name of the algorithm.
docstr: Update dual func optimize input values based on samples data.
  
  Args:
      episodes (EpisodeBatch): Batch of episodes.
  
  Returns:
      list(np.ndarray): Flatten dual function optimization input values.
docstr_tok: ["Update","dual","func","optimize","input","values","based","on","samples","data",".","Args",":","episodes","(","EpisodeBatch",")",":","Batch","of","episodes",".","Returns",":","list","(","np.ndarray",")",":","Flatten","dual","function","optimization","input","values","."]
code: def _dual_opt_input_values(self, episodes):
      """Update dual func optimize input values based on samples data.
  
      Args:
          episodes (EpisodeBatch): Batch of episodes.
  
      Returns:
          list(np.ndarray): Flatten dual function optimization input values.
  
      """
      agent_infos = episodes.padded_agent_infos
      policy_state_info_list = [
          agent_infos[k] for k in self.policy.state_info_keys
      ]
  
      # pylint: disable=unexpected-keyword-arg
      dual_opt_input_values = self._dual_opt_inputs._replace(
          reward_var=episodes.padded_rewards,
          valid_var=episodes.valids,
          feat_diff=self._feat_diff,
          param_eta=self._param_eta,
          param_v=self._param_v,
          policy_state_info_vars_list=policy_state_info_list,
      )
  
      return flatten_inputs(dual_opt_input_values)
  
imports: import collections
  from dowel import logger, tabular
  import numpy
  import scipy.optimize
  import tensorflow
  from garage import _Default, log_performance, make_optimizer
  from garage.np import pad_batch_array
  from garage.np.algos import RLAlgorithm
  from garage.tf import compile_function, flatten_inputs, graph_inputs, new_tensor
  from garage.tf.optimizers import LBFGSOptimizer
label_desc: Use image node_id 10 for calling the REPS obj's underlying member method code with example usage: obj._dual_opt_input_values(episodes) and returns: flatten_inputs