tf_agents.bandits.drivers.driver_utils.trajectory_for_bandit
Stay organized with collections
Save and categorize content based on your preferences.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]