tf_agents.bandits.drivers.driver_utils.trajectory_for_bandit
Builds a trajectory from a single-step bandit episode.
tf_agents.bandits.drivers.driver_utils.trajectory_for_bandit(
initial_step: tf_agents.typing.types.TimeStep
,
action_step: tf_agents.typing.types.PolicyStep
,
final_step: tf_agents.typing.types.TimeStep
) -> tf_agents.typing.types.NestedTensor
Since all episodes consist of a single step, the returned Trajectory
has no
time dimension. All input and output Tensor
s/arrays are expected to have
shape [batch_size, ...]
.
Args |
initial_step
|
A TimeStep returned from environment.step(...) .
|
action_step
|
A PolicyStep returned by policy.action(...) .
|
final_step
|
A TimeStep returned from environment.step(...) .
|
Returns |
A Trajectory containing zeros for discount value and StepType.LAST for
both step_type and next_step_type .
|
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."],[],[]]