pub struct IqnConfig<F, M>where
F: SubModel,
M: SubModel,
F::Config: DeserializeOwned + Serialize + Clone,
M::Config: DeserializeOwned + Serialize + Clone + OutDim,{
pub model_config: IqnModelConfig<F::Config, M::Config>,
pub soft_update_interval: usize,
pub n_updates_per_opt: usize,
pub batch_size: usize,
pub discount_factor: f64,
pub tau: f64,
pub train: bool,
pub explorer: IqnExplorer,
pub sample_percents_pred: IqnSample,
pub sample_percents_tgt: IqnSample,
pub sample_percents_act: IqnSample,
pub device: Option<Device>,
/* private fields */
}Expand description
Configuration of Iqn agent.
Fields§
§model_config: IqnModelConfig<F::Config, M::Config>§soft_update_interval: usize§n_updates_per_opt: usize§batch_size: usize§discount_factor: f64§tau: f64§train: bool§explorer: IqnExplorer§sample_percents_pred: IqnSample§sample_percents_tgt: IqnSample§sample_percents_act: IqnSample§device: Option<Device>Implementations§
Source§impl<F, M> IqnConfig<F, M>
impl<F, M> IqnConfig<F, M>
Sourcepub fn model_config(
self,
model_config: IqnModelConfig<F::Config, M::Config>,
) -> Self
pub fn model_config( self, model_config: IqnModelConfig<F::Config, M::Config>, ) -> Self
Sets the configuration of the model.
Sourcepub fn soft_update_interval(self, v: usize) -> Self
pub fn soft_update_interval(self, v: usize) -> Self
Set soft update interval.
Sourcepub fn n_updates_per_opt(self, v: usize) -> Self
pub fn n_updates_per_opt(self, v: usize) -> Self
Set numper of parameter update steps per optimization step.
Sourcepub fn batch_size(self, v: usize) -> Self
pub fn batch_size(self, v: usize) -> Self
Batch size.
Sourcepub fn discount_factor(self, v: f64) -> Self
pub fn discount_factor(self, v: f64) -> Self
Discount factor.
Sourcepub fn explorer(self, v: IqnExplorer) -> Self
pub fn explorer(self, v: IqnExplorer) -> Self
Set explorer.
Sourcepub fn sample_percent_pred(self, v: IqnSample) -> Self
pub fn sample_percent_pred(self, v: IqnSample) -> Self
Sampling percent points.
Sourcepub fn sample_percent_tgt(self, v: IqnSample) -> Self
pub fn sample_percent_tgt(self, v: IqnSample) -> Self
Sampling percent points.
Sourcepub fn sample_percent_act(self, v: IqnSample) -> Self
pub fn sample_percent_act(self, v: IqnSample) -> Self
Sampling percent points.
Trait Implementations§
Source§impl<'de, F, M> Deserialize<'de> for IqnConfig<F, M>
impl<'de, F, M> Deserialize<'de> for IqnConfig<F, M>
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<F, M> StructuralPartialEq for IqnConfig<F, M>
Auto Trait Implementations§
impl<F, M> Freeze for IqnConfig<F, M>
impl<F, M> RefUnwindSafe for IqnConfig<F, M>where
<M as SubModel>::Config: Sized + RefUnwindSafe,
<F as SubModel>::Config: Sized + RefUnwindSafe,
F: RefUnwindSafe,
M: RefUnwindSafe,
impl<F, M> Send for IqnConfig<F, M>
impl<F, M> Sync for IqnConfig<F, M>
impl<F, M> Unpin for IqnConfig<F, M>
impl<F, M> UnwindSafe for IqnConfig<F, M>where
<M as SubModel>::Config: Sized + UnwindSafe,
<F as SubModel>::Config: Sized + UnwindSafe,
F: UnwindSafe,
M: UnwindSafe,
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