View source on GitHub |
Mask boundary trajectories and those with invalid returns and advantages.
tf_agents.agents.ppo.ppo_utils.make_trajectory_mask(
batched_traj: tf_agents.trajectories.Trajectory
) -> tf_agents.typing.types.Tensor
Args | |
---|---|
batched_traj
|
Trajectory, doubly-batched [batch_dim, time_dim,...]. It must be preprocessed already. |
Returns | |
---|---|
A mask, type tf.float32, that is 0.0 for all between-episode Trajectory (batched_traj.step_type is LAST) and 0.0 if the return value is unavailable. |