pub struct TrpoConfig<MB, OC = ConjugateGradientOptimizerConfig> {
pub policy_fn_config: MB,
pub optimizer_config: OC,
pub max_policy_step_kl: f64,
}
Expand description
Configuration for Trpo
Fields
policy_fn_config: MB
optimizer_config: OC
max_policy_step_kl: f64
Maximum policy KL divergence when taking a step.
Specifically, this is the mean KL divergence of the action distributions across all observed states.
Trait Implementations
sourceimpl<MB, OC> BuildPolicy for TrpoConfig<MB, OC> where
MB: BuildModule,
MB::Module: SeqPacked + SeqIterative,
OC: BuildOptimizer,
OC::Optimizer: TrustRegionOptimizer,
impl<MB, OC> BuildPolicy for TrpoConfig<MB, OC> where
MB: BuildModule,
MB::Module: SeqPacked + SeqIterative,
OC: BuildOptimizer,
OC::Optimizer: TrustRegionOptimizer,
type Policy = Trpo<<MB as BuildModule>::Module, <OC as BuildOptimizer>::Optimizer>
fn build_policy(
&self,
in_dim: usize,
out_dim: usize,
device: Device
) -> Self::Policy
sourceimpl<MB: Clone, OC: Clone> Clone for TrpoConfig<MB, OC>
impl<MB: Clone, OC: Clone> Clone for TrpoConfig<MB, OC>
sourcefn clone(&self) -> TrpoConfig<MB, OC>
fn clone(&self) -> TrpoConfig<MB, OC>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<MB: Debug, OC: Debug> Debug for TrpoConfig<MB, OC>
impl<MB: Debug, OC: Debug> Debug for TrpoConfig<MB, OC>
sourceimpl<MB, OC> Default for TrpoConfig<MB, OC> where
MB: Default,
OC: Default,
impl<MB, OC> Default for TrpoConfig<MB, OC> where
MB: Default,
OC: Default,
sourceimpl<'de, MB, OC> Deserialize<'de> for TrpoConfig<MB, OC> where
MB: Deserialize<'de>,
OC: Deserialize<'de>,
impl<'de, MB, OC> Deserialize<'de> for TrpoConfig<MB, OC> where
MB: Deserialize<'de>,
OC: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<MB: PartialEq, OC: PartialEq> PartialEq<TrpoConfig<MB, OC>> for TrpoConfig<MB, OC>
impl<MB: PartialEq, OC: PartialEq> PartialEq<TrpoConfig<MB, OC>> for TrpoConfig<MB, OC>
sourcefn eq(&self, other: &TrpoConfig<MB, OC>) -> bool
fn eq(&self, other: &TrpoConfig<MB, OC>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TrpoConfig<MB, OC>) -> bool
fn ne(&self, other: &TrpoConfig<MB, OC>) -> bool
This method tests for !=
.
sourceimpl<MB, OC> Serialize for TrpoConfig<MB, OC> where
MB: Serialize,
OC: Serialize,
impl<MB, OC> Serialize for TrpoConfig<MB, OC> where
MB: Serialize,
OC: Serialize,
impl<MB: Copy, OC: Copy> Copy for TrpoConfig<MB, OC>
impl<MB, OC> StructuralPartialEq for TrpoConfig<MB, OC>
Auto Trait Implementations
impl<MB, OC> RefUnwindSafe for TrpoConfig<MB, OC> where
MB: RefUnwindSafe,
OC: RefUnwindSafe,
impl<MB, OC> Send for TrpoConfig<MB, OC> where
MB: Send,
OC: Send,
impl<MB, OC> Sync for TrpoConfig<MB, OC> where
MB: Sync,
OC: Sync,
impl<MB, OC> Unpin for TrpoConfig<MB, OC> where
MB: Unpin,
OC: Unpin,
impl<MB, OC> UnwindSafe for TrpoConfig<MB, OC> where
MB: UnwindSafe,
OC: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more