pub struct PerConfig {
pub alpha: f32,
pub beta_0: f32,
pub beta_final: f32,
pub n_opts_final: usize,
pub normalize: WeightNormalizer,
}
Expand description
Configuration for prioritized experience replay.
Fields§
§alpha: f32
Exponent for prioritization.
beta_0: f32
Initial value of $\beta$.
beta_final: f32
Final value of $\beta$.
n_opts_final: usize
Optimization step when beta reaches its final value.
normalize: WeightNormalizer
How to normalize the weights.
Implementations§
Source§impl PerConfig
impl PerConfig
Sourcepub fn beta_0(self, beta_0: f32) -> Self
pub fn beta_0(self, beta_0: f32) -> Self
Sets beta_0, the initial value of the exponent of importance weights.
Sourcepub fn beta_final(self, beta_final: f32) -> Self
pub fn beta_final(self, beta_final: f32) -> Self
Sets beta_final, the final value of the exponent of importance weights.
Sourcepub fn n_opts_final(self, n_opts_final: usize) -> Self
pub fn n_opts_final(self, n_opts_final: usize) -> Self
Sets the optimization step when beta reaches the final value.
Sourcepub fn normalize(self, normalize: WeightNormalizer) -> Self
pub fn normalize(self, normalize: WeightNormalizer) -> Self
Sets how to normalize the importance weight.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PerConfig
impl<'de> Deserialize<'de> for PerConfig
Source§fn 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
impl StructuralPartialEq for PerConfig
Auto Trait Implementations§
impl Freeze for PerConfig
impl RefUnwindSafe for PerConfig
impl Send for PerConfig
impl Sync for PerConfig
impl Unpin for PerConfig
impl UnwindSafe for PerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more