tf_agents.drivers.driver.Driver
A driver that takes steps in an environment using a policy.
tf_agents.drivers.driver.Driver(
env, policy, observers=None, transition_observers=None, info_observers=None
)
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).
|
Attributes |
env
|
|
info_observers
|
|
observers
|
|
policy
|
|
transition_observers
|
|
Methods
run
View source
@abc.abstractmethod
run()
Takes steps in the environment and updates observers.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[]]