Struct border::agent::tch::sac::base::SAC[][src]

pub struct SAC<E, Q, P, O, A> where
    E: Env,
    O: TchBuffer<Item = E::Obs>,
    A: TchBuffer<Item = E::Act>, 
{ /* fields omitted */ }

Soft actor critic agent.

Trait Implementations

impl<E, Q, P, O, A> Agent<E> for SAC<E, Q, P, O, A> where
    E: Env,
    Q: Model2<Input1 = O::SubBatch, Input2 = A::SubBatch, Output = Tensor> + Clone,
    P: Model1<Input = Tensor, Output = (Tensor, Tensor)> + Clone,
    E::Obs: Into<O::SubBatch>,
    E::Act: From<Tensor>,
    O: TchBuffer<Item = E::Obs, SubBatch = P::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
  • loss_actor: Loss of actor

impl<E, Q, P, O, A> Policy<E> for SAC<E, Q, P, O, A> where
    E: Env,
    Q: Model2<Input1 = O::SubBatch, Input2 = A::SubBatch, Output = Tensor> + Clone,
    P: Model1<Input = Tensor, Output = (Tensor, Tensor)> + Clone,
    E::Obs: Into<O::SubBatch>,
    E::Act: From<Tensor>,
    O: TchBuffer<Item = E::Obs, SubBatch = P::Input>,
    A: TchBuffer<Item = E::Act, SubBatch = Tensor>, 
[src]

Auto Trait Implementations

impl<E, Q, P, O, A> !RefUnwindSafe for SAC<E, Q, P, O, A>

impl<E, Q, P, O, A> Send for SAC<E, Q, P, O, A> where
    A: Send,
    E: Send,
    O: Send,
    P: Send,
    Q: Send,
    <E as Env>::Obs: Send

impl<E, Q, P, O, A> !Sync for SAC<E, Q, P, O, A>

impl<E, Q, P, O, A> Unpin for SAC<E, Q, P, O, A> where
    A: Unpin,
    E: Unpin,
    O: Unpin,
    P: Unpin,
    Q: Unpin,
    <E as Env>::Obs: Unpin

impl<E, Q, P, O, A> UnwindSafe for SAC<E, Q, P, O, A> where
    A: UnwindSafe,
    E: UnwindSafe,
    O: UnwindSafe,
    P: UnwindSafe,
    Q: 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>,