def __init__(<EOL>self,<EOL>states,<EOL>actions,<EOL>scope,<EOL>device,<EOL>saver,<EOL>summarizer,<EOL>execution,<EOL>batching_capacity,<EOL>variable_noise,<EOL>states_preprocessing,<EOL>actions_exploration,<EOL>reward_preprocessing,<EOL>tf_session_dump_dir="<STR_LIT>"<EOL>):
<EOL>self.network = None<EOL>self.states_spec = states<EOL>self.internals_spec = dict()<EOL>self.actions_spec = actions<EOL>self.scope = scope<EOL>self.device = device<EOL>if saver is None or saver.get('<STR_LIT>') is None:<EOL><INDENT>self.saver_spec = None<EOL><DEDENT>else:<EOL><INDENT>self.saver_spec = saver<EOL><DEDENT>if summarizer is None or summarizer.get('<STR_LIT>') is None:<EOL><INDENT>self.summarizer_spec = None<EOL>self.summary_labels = set()<EOL><DEDENT>else:<EOL><INDENT>self.summarizer_spec = summarizer<EOL>self.summary_labels = set(self.summarizer_spec.get('<STR_LIT>', ()))<EOL><DEDENT>self.summarizer = None<EOL>self.graph_summary = None<EOL>self.summarizer_init_op = None<EOL>self.flush_summarizer = None<EOL>self.execution_spec = execution<EOL>self.execution_type = self.execution_spec["<STR_LIT:type>"]<EOL>self.session_config = self.execution_spec["<STR_LIT>"]<EOL>self.distributed_spec = self.execution_spec["<STR_LIT>"]<EOL>assert batching_capacity is None or (isinstance(batching_capacity, int) and batching_capacity > <NUM_LIT:0>)<EOL>self.batching_capacity = batching_capacity or <NUM_LIT:1>  <EOL>self.tf_session_dump_dir = tf_session_dump_dir<EOL>self.num_parallel = self.execution_spec.get('<STR_LIT>')<EOL>if self.num_parallel is None:<EOL><INDENT>self.num_parallel = <NUM_LIT:1><EOL><DEDENT>self.list_states_buffer = dict()<EOL>self.list_internals_buffer = dict()<EOL>self.list_actions_buffer = dict()<EOL>self.list_buffer_index = [None for _ in range(self.num_parallel)]<EOL>self.episode_output = None<EOL>self.episode_index_input = None<EOL>self.unbuffered_episode_output = None<EOL>assert variable_noise is None or variable_noise > <NUM_LIT:0.0><EOL>self.variable_noise = variable_noise<EOL>self.states_preprocessing_spec = states_preprocessing<EOL>self.actions_exploration_spec = actions_exploration<EOL>self.reward_preprocessing_spec = reward_preprocessing<EOL>self.variables = None<EOL>self.all_variables = None<EOL>self.registered_variables = None<EOL>self.list_timestep = [None for _ in range(self.num_parallel)]<EOL>self.episode = None<EOL>self.global_timestep = None<EOL>self.global_episode = None<EOL>self.states_input = dict()<EOL>self.states_preprocessing = dict()<EOL>self.internals_input = dict()<EOL>self.internals_init = dict()<EOL>self.actions_input = dict()<EOL>self.actions_exploration = dict()<EOL>self.terminal_input = None<EOL>self.reward_input = None<EOL>self.reward_preprocessing = None<EOL>self.deterministic_input = None<EOL>self.independent_input = None<EOL>self.update_input = None<EOL>self.fn_initialize = None<EOL>self.fn_preprocess = None<EOL>self.fn_actions_and_internals = None<EOL>self.fn_observe_timestep = None<EOL>self.fn_action_exploration = None<EOL>self.graph = None<EOL>self.global_model = None<EOL>self.is_local_model = True<EOL>self.server = None<EOL>self.summarizer = None<EOL>self.saver = None<EOL>self.saver_directory = None<EOL>self.scaffold = None<EOL>self.session = None<EOL>self.monitored_session = None<EOL>self.actions_output = None<EOL>self.internals_output = None<EOL>self.timestep_output = None<EOL>self.list_buffer_index_reset_op = None<EOL>self.setup()<EOL>
Model.

Args:
    states (spec): The state-space description dictionary.
    actions (spec): The action-space description dictionary.
    scope (str): The root scope str to use for tf variable scoping.
    device (str): The name of the device to run the graph of this model on.
    saver (spec): Dict specifying whether and how to save the model's parameters.
    summarizer (spec): Dict specifying which tensorboard summaries should be created and added to the graph.
    execution (spec): Dict specifying whether and how to do distributed training on the model's graph.
    batching_capacity (int): Batching capacity.
    variable_noise (float): The stddev value of a Normal distribution used for adding random
        noise to the model's output (for each batch, noise can be toggled and - if active - will be resampled).
        Use None for not adding any noise.
    states_preprocessing (spec / dict of specs): Dict specifying whether and how to preprocess state signals
        (e.g. normalization, greyscale, etc..).
    actions_exploration (spec / dict of specs): Dict specifying whether and how to add exploration to the model's
        "action outputs" (e.g. epsilon-greedy).
    reward_preprocessing (spec): Dict specifying whether and how to preprocess rewards coming
        from the Environment (e.g. reward normalization).
    tf_session_dump_dir (str): If non-empty string, all session.run calls will be dumped using the tensorflow
        offline-debug session into the given directory.
    execution: (dict)
        - num_parallel: (int) number of parallel episodes