class_docstr: An agent with a fixed policy and no learning.
class_docstr_tok: ["An","agent","with","a","fixed","policy","and","no","learning","."]
docstr: Creates a fixed-policy agent with no-op for training.
  
  Args:
    time_step_spec: A `TimeStep` spec of the expected time_steps.
    action_spec: A nest of BoundedTensorSpec representing the actions.
    policy_class: a tf_policy.TFPolicy or py_policy.PyPolicy class to use as a
      policy.
    debug_summaries: A bool to gather debug summaries. Used to initialize the
      base class
    summarize_grads_and_vars: If true, gradient summaries will be written.
    train_step_counter: An optional counter to increment every time the train
      op is run.  Defaults to the global_step. Used to initialize the base
      class
    num_outer_dims: Used to initialize the base class
    name: The name of this agent. All variables in this module will fall under
      that name. Defaults to the class name. Used to initialize the base
      class.
docstr_tok: ["Creates","a","fixed-policy","agent","with","no-op","for","training",".","Args",":","time_step_spec",":","A","`","TimeStep","`","spec","of","the","expected","time_steps",".","action_spec",":","A","nest","of","BoundedTensorSpec","representing","the","actions",".","policy_class",":","a","tf_policy.TFPolicy","or","py_policy.PyPolicy","class","to","use","as","a","policy",".","debug_summaries",":","A","bool","to","gather","debug","summaries",".","Used","to","initialize","the","base","class","summarize_grads_and_vars",":","If","true",",","gradient","summaries","will","be","written",".","train_step_counter",":","An","optional","counter","to","increment","every","time","the","train","op","is","run",".","Defaults","to","the","global_step",".","Used","to","initialize","the","base","class","num_outer_dims",":","Used","to","initialize","the","base","class","name",":","The","name","of","this","agent",".","All","variables","in","this","module","will","fall","under","that","name",".","Defaults","to","the","class","name",".","Used","to","initialize","the","base","class","."]
code: def __init__(
      self,
      time_step_spec: ts.TimeStep,
      action_spec: types.NestedTensorSpec,
      policy_class: PolicyClassType,
      debug_summaries: bool = False,
      summarize_grads_and_vars: bool = False,
      train_step_counter: Optional[tf.Variable] = None,
      num_outer_dims: int = 1,
      name: Optional[Text] = None,
  ):
      """Creates a fixed-policy agent with no-op for training.
  
      Args:
        time_step_spec: A `TimeStep` spec of the expected time_steps.
        action_spec: A nest of BoundedTensorSpec representing the actions.
        policy_class: a tf_policy.TFPolicy or py_policy.PyPolicy class to use as a
          policy.
        debug_summaries: A bool to gather debug summaries. Used to initialize the
          base class
        summarize_grads_and_vars: If true, gradient summaries will be written.
        train_step_counter: An optional counter to increment every time the train
          op is run.  Defaults to the global_step. Used to initialize the base
          class
        num_outer_dims: Used to initialize the base class
        name: The name of this agent. All variables in this module will fall under
          that name. Defaults to the class name. Used to initialize the base
          class.
      """
      tf.Module.__init__(self, name=name)
  
      policy = policy_class(
          time_step_spec=time_step_spec, action_spec=action_spec
      )
  
      collect_policy = policy
  
      super(FixedPolicyAgent, self).__init__(
          time_step_spec,
          action_spec,
          policy,
          collect_policy,
          train_sequence_length=None,
          debug_summaries=debug_summaries,
          summarize_grads_and_vars=summarize_grads_and_vars,
          train_step_counter=train_step_counter,
          num_outer_dims=num_outer_dims,
      )
  
file_path: agents/tf_agents/agents/random/fixed_policy_agent.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Callable, Optional, Text, Union
  import gin
  import tensorflow.compat.v2
  import tf_agents.agents.tf_agent
  from tf_agents.policies import py_policy
  from tf_agents.policies import tf_policy
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
label_desc: Use image node_id 1 to create a new FixedPolicyAgent object from inherited base classes: tf_agent with example: obj = FixedPolicyAgent(time_step_spec, action_spec, policy_class, debug_summaries, summarize_grads_and_vars, train_step_counter, num_outer_dims, name)