def get_variables(self, include_submodules=False, include_nontrainable=False):
if include_nontrainable:<EOL><INDENT>model_variables = [self.all_variables[key] for key in sorted(self.all_variables)]<EOL>states_preprocessing_variables = [<EOL>variable for name in sorted(self.states_preprocessing)<EOL>for variable in self.states_preprocessing[name].get_variables()<EOL>]<EOL>model_variables += states_preprocessing_variables<EOL>actions_exploration_variables = [<EOL>variable for name in sorted(self.actions_exploration)<EOL>for variable in self.actions_exploration[name].get_variables()<EOL>]<EOL>model_variables += actions_exploration_variables<EOL>if self.reward_preprocessing is not None:<EOL><INDENT>reward_preprocessing_variables = self.reward_preprocessing.get_variables()<EOL>model_variables += reward_preprocessing_variables<EOL><DEDENT><DEDENT>else:<EOL><INDENT>model_variables = [self.variables[key] for key in sorted(self.variables)]<EOL><DEDENT>return model_variables<EOL>
Returns the TensorFlow variables used by the model.

Args:
    include_submodules: Includes variables of submodules (e.g. baseline, target network)
        if true.
    include_nontrainable: Includes non-trainable variables if true.

Returns:
    List of variables.