Struct border::agent::tch::sac::base::SAC [−][src]
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]
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>,
fn train(&mut self)
[src]
fn eval(&mut self)
[src]
fn is_train(&self) -> bool
[src]
fn push_obs(&self, obs: &E::Obs)
[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 criticloss_actor
: Loss of actor
fn save<T: AsRef<Path>>(&self, path: T) -> Result<(), Box<dyn Error>>
[src]
fn load<T: AsRef<Path>>(&mut self, path: T) -> Result<(), Box<dyn Error>>
[src]
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]
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>,
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,
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,
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,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,