Struct border::agent::tch::dqn::dqn::DQN[][src]

pub struct DQN<E, M, O, A> where
    E: Env,
    M: Model1 + Clone,
    E::Obs: Into<M::Input>,
    E::Act: From<Tensor>,
    O: TchBuffer<Item = E::Obs, SubBatch = M::Input>,
    A: TchBuffer<Item = E::Act, SubBatch = Tensor>, 
{ /* fields omitted */ }

DQN agent implemented with tch-rs.

Trait Implementations

impl<E, M, O, A> Agent<E> for DQN<E, M, O, A> where
    E: Env,
    M: Model1<Input = Tensor, Output = Tensor> + Clone,
    E::Obs: Into<M::Input>,
    E::Act: From<Tensor>,
    O: TchBuffer<Item = E::Obs, SubBatch = M::Input>,
    A: TchBuffer<Item = E::Act, SubBatch = Tensor>, 
[src]

fn observe(&mut self, step: Step<E>) -> Option<Record>[src]

Update model parameters.

When the return value is Some(Record), it includes:

  • loss_critic: Loss of critic

impl<E, M, O, A> Policy<E> for DQN<E, M, O, A> where
    E: Env,
    M: Model1<Input = Tensor, Output = Tensor> + Clone,
    E::Obs: Into<M::Input>,
    E::Act: From<Tensor>,
    O: TchBuffer<Item = E::Obs, SubBatch = M::Input>,
    A: TchBuffer<Item = E::Act, SubBatch = Tensor>, 
[src]

Auto Trait Implementations

impl<E, M, O, A> !RefUnwindSafe for DQN<E, M, O, A>

impl<E, M, O, A> Send for DQN<E, M, O, A> where
    A: Send,
    E: Send,
    M: Send,
    O: Send,
    <E as Env>::Obs: Send

impl<E, M, O, A> !Sync for DQN<E, M, O, A>

impl<E, M, O, A> Unpin for DQN<E, M, O, A> where
    A: Unpin,
    E: Unpin,
    M: Unpin,
    O: Unpin,
    <E as Env>::Obs: Unpin

impl<E, M, O, A> UnwindSafe for DQN<E, M, O, A> where
    A: UnwindSafe,
    E: UnwindSafe,
    M: UnwindSafe,
    O: UnwindSafe,
    <E as Env>::Obs: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,