pub struct SequenceBatch {
pub observations: Vec<f32>,
pub next_observations: Vec<f32>,
pub actions: Vec<f32>,
pub rewards: Vec<f32>,
pub terminated: Vec<bool>,
pub truncated: Vec<bool>,
pub obs_dim: usize,
pub act_dim: usize,
pub batch_size: usize,
pub seq_len: usize,
}Expand description
A batch of sampled sequences.
Fields§
§observations: Vec<f32>Observations: flat (batch_size * seq_len * obs_dim).
next_observations: Vec<f32>Next observations: flat (batch_size * seq_len * obs_dim).
actions: Vec<f32>Actions: flat (batch_size * seq_len * act_dim).
rewards: Vec<f32>Rewards: flat (batch_size * seq_len).
terminated: Vec<bool>Terminated flags: flat (batch_size * seq_len).
truncated: Vec<bool>Truncated flags: flat (batch_size * seq_len).
obs_dim: usize§act_dim: usize§batch_size: usize§seq_len: usizeTrait Implementations§
Source§impl Clone for SequenceBatch
impl Clone for SequenceBatch
Source§fn clone(&self) -> SequenceBatch
fn clone(&self) -> SequenceBatch
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 SequenceBatch
impl RefUnwindSafe for SequenceBatch
impl Send for SequenceBatch
impl Sync for SequenceBatch
impl Unpin for SequenceBatch
impl UnwindSafe for SequenceBatch
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