pub struct BatchTransition {
pub obs: Vec<Vec<f32>>,
pub obs_flat: Vec<f32>,
pub obs_dim: usize,
pub rewards: Vec<f64>,
pub terminated: Vec<bool>,
pub truncated: Vec<bool>,
pub terminal_obs: Vec<Option<Vec<f32>>>,
}Expand description
Columnar batch of transitions from parallel stepping.
Fields§
§obs: Vec<Vec<f32>>Observations: [num_envs][obs_dim] — post-reset obs when done
obs_flat: Vec<f32>Flat observations: [num_envs * obs_dim] contiguous layout.
Populated by step_all_flat. Empty when using step_all.
obs_dim: usizeObservation dimensionality (set by step_all_flat).
rewards: Vec<f64>Rewards: [num_envs]
terminated: Vec<bool>Terminated flags: [num_envs]
truncated: Vec<bool>Truncated flags: [num_envs]
terminal_obs: Vec<Option<Vec<f32>>>Terminal observations: Some when terminated or truncated, None otherwise.
Contains the observation before auto-reset, needed for value bootstrapping.
Trait Implementations§
Source§impl Clone for BatchTransition
impl Clone for BatchTransition
Source§fn clone(&self) -> BatchTransition
fn clone(&self) -> BatchTransition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BatchTransition
impl RefUnwindSafe for BatchTransition
impl Send for BatchTransition
impl Sync for BatchTransition
impl Unpin for BatchTransition
impl UnwindSafe for BatchTransition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more