class_docstr: A driver that takes steps in an environment using a policy.
docstr: Creates a Driver.
  
  Args:
    env: An environment.Base environment.
    policy: A policy.Base policy.
    observers: A list of observers that are updated after the driver is run.
      Each observer is a callable(Trajectory) that returns the input.
      Trajectory.time_step is a stacked batch [N+1, batch_size, ...] of
      timesteps and Trajectory.action is a stacked batch [N, batch_size, ...]
      of actions in time major form.
    transition_observers: A list of observers that are updated after every
      step in the environment. Each observer is a callable((TimeStep,
      PolicyStep, NextTimeStep)). The transition is shaped just as
      trajectories are for regular observers.
    info_observers: A list of observers that are updated after the driver is
      run. Each observer is a callable(info).
docstr_tok: ["Creates","a","Driver",".","Args",":","env",":","An","environment.Base","environment",".","policy",":","A","policy.Base","policy",".","observers",":","A","list","of","observers","that","are","updated","after","the","driver","is","run",".","Each","observer","is","a","callable","(","Trajectory",")","that","returns","the","input",".","Trajectory.time_step","is","a","stacked","batch","[","N+1",",","batch_size",",","...","]","of","timesteps","and","Trajectory.action","is","a","stacked","batch","[","N",",","batch_size",",","...","]","of","actions","in","time","major","form",".","transition_observers",":","A","list","of","observers","that","are","updated","after","every","step","in","the","environment",".","Each","observer","is","a","callable","(","(","TimeStep",",","PolicyStep",",","NextTimeStep",")",")",".","The","transition","is","shaped","just","as","trajectories","are","for","regular","observers",".","info_observers",":","A","list","of","observers","that","are","updated","after","the","driver","is","run",".","Each","observer","is","a","callable","(","info",")","."]
code: def __init__(
      self,
      env,
      policy,
      observers=None,
      transition_observers=None,
      info_observers=None,
  ):
      """Creates a Driver.
  
      Args:
        env: An environment.Base environment.
        policy: A policy.Base policy.
        observers: A list of observers that are updated after the driver is run.
          Each observer is a callable(Trajectory) that returns the input.
          Trajectory.time_step is a stacked batch [N+1, batch_size, ...] of
          timesteps and Trajectory.action is a stacked batch [N, batch_size, ...]
          of actions in time major form.
        transition_observers: A list of observers that are updated after every
          step in the environment. Each observer is a callable((TimeStep,
          PolicyStep, NextTimeStep)). The transition is shaped just as
          trajectories are for regular observers.
        info_observers: A list of observers that are updated after the driver is
          run. Each observer is a callable(info).
      """
  
      self._env = env
      self._policy = policy
      self._observers = observers or []
      self._transition_observers = transition_observers or []
      self._info_observers = info_observers or []
  
file_path: agents/tf_agents/drivers/driver.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import six
label_desc: Use image node_id 1 to create a new Driver object from inherited base classes: object with example: obj = Driver(env, policy, observers, transition_observers, info_observers)