Skip to main content

TransitionBatch

Struct TransitionBatch 

Source
pub struct TransitionBatch<B: Backend, SB, AB> {
    pub states: SB,
    pub next_states: SB,
    pub actions: AB,
    pub rewards: Tensor<B, 2>,
    pub dones: Tensor<B, 2>,
}
Expand description

A batch of transitions.

Fields§

§states: SB

Batched initial states.

§next_states: SB

Batched resulting states.

§actions: AB

Batched actions.

§rewards: Tensor<B, 2>

Batched rewards.

§dones: Tensor<B, 2>

Batched flags for terminal states.

Auto Trait Implementations§

§

impl<B, SB, AB> Freeze for TransitionBatch<B, SB, AB>

§

impl<B, SB, AB> RefUnwindSafe for TransitionBatch<B, SB, AB>

§

impl<B, SB, AB> Send for TransitionBatch<B, SB, AB>
where SB: Send, AB: Send,

§

impl<B, SB, AB> Sync for TransitionBatch<B, SB, AB>
where SB: Sync, AB: Sync,

§

impl<B, SB, AB> Unpin for TransitionBatch<B, SB, AB>

§

impl<B, SB, AB> UnsafeUnpin for TransitionBatch<B, SB, AB>

§

impl<B, SB, AB> UnwindSafe for TransitionBatch<B, SB, AB>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.