pub struct IqnConfig<F, M>where
    F: SubModel,
    M: SubModel,
    F::Config: DeserializeOwned + Serialize + Clone,
    M::Config: DeserializeOwned + Serialize + Clone + OutDim,{
    pub device: Option<Device>,
    /* private fields */
}
Expand description

Configuration of Iqn agent.

Fields§

§device: Option<Device>

Implementations§

source§

impl<F, M> IqnConfig<F, M>where F: SubModel, M: SubModel, F::Config: DeserializeOwned + Serialize + Clone, M::Config: DeserializeOwned + Serialize + Clone + OutDim,

source

pub fn model_config( self, model_config: IqnModelConfig<F::Config, M::Config> ) -> Self

Sets the configuration of the model.

source

pub fn soft_update_interval(self, v: usize) -> Self

Set soft update interval.

source

pub fn n_updates_per_opt(self, v: usize) -> Self

Set numper of parameter update steps per optimization step.

source

pub fn min_transitions_warmup(self, v: usize) -> Self

Interval before starting optimization.

source

pub fn batch_size(self, v: usize) -> Self

Batch size.

source

pub fn discount_factor(self, v: f64) -> Self

Discount factor.

source

pub fn tau(self, v: f64) -> Self

Soft update coefficient.

source

pub fn explorer(self, v: IqnExplorer) -> Self

Set explorer.

source

pub fn out_dim(self, out_dim: i64) -> Self

Sets the output dimention of the iqn model.

source

pub fn sample_percent_pred(self, v: IqnSample) -> Self

Sampling percent points.

source

pub fn sample_percent_tgt(self, v: IqnSample) -> Self

Sampling percent points.

source

pub fn sample_percent_act(self, v: IqnSample) -> Self

Sampling percent points.

source

pub fn device(self, device: Device) -> Self

Device.

source

pub fn load(path: impl AsRef<Path>) -> Result<Self>

Constructs IqnConfig from YAML file.

source

pub fn save(&self, path: impl AsRef<Path>) -> Result<()>

Saves IqnConfig.

Trait Implementations§

source§

impl<F, M> Clone for IqnConfig<F, M>where F: SubModel, M: SubModel, F::Config: DeserializeOwned + Serialize + Clone, M::Config: DeserializeOwned + Serialize + Clone + OutDim,

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F, M> Debug for IqnConfig<F, M>where F: SubModel + Debug, M: SubModel + Debug, F::Config: DeserializeOwned + Serialize + Clone + Debug, M::Config: DeserializeOwned + Serialize + Clone + OutDim + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F, M> Default for IqnConfig<F, M>where F: SubModel, M: SubModel, F::Config: DeserializeOwned + Serialize + Clone, M::Config: DeserializeOwned + Serialize + Clone + OutDim,

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de, F, M> Deserialize<'de> for IqnConfig<F, M>where F: SubModel, M: SubModel, F::Config: DeserializeOwned + Serialize + Clone, M::Config: DeserializeOwned + Serialize + Clone + OutDim,

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<F, M> PartialEq<IqnConfig<F, M>> for IqnConfig<F, M>where F: SubModel + PartialEq, M: SubModel + PartialEq, F::Config: DeserializeOwned + Serialize + Clone + PartialEq, M::Config: DeserializeOwned + Serialize + Clone + OutDim + PartialEq,

source§

fn eq(&self, other: &IqnConfig<F, M>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<F, M> Serialize for IqnConfig<F, M>where F: SubModel, M: SubModel, F::Config: DeserializeOwned + Serialize + Clone, M::Config: DeserializeOwned + Serialize + Clone + OutDim,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<F, M> StructuralPartialEq for IqnConfig<F, M>where F: SubModel, M: SubModel, F::Config: DeserializeOwned + Serialize + Clone, M::Config: DeserializeOwned + Serialize + Clone + OutDim,

Auto Trait Implementations§

§

impl<F, M> RefUnwindSafe for IqnConfig<F, M>where F: RefUnwindSafe, M: RefUnwindSafe, <F as SubModel>::Config: RefUnwindSafe, <M as SubModel>::Config: RefUnwindSafe,

§

impl<F, M> Send for IqnConfig<F, M>where F: Send, M: Send, <F as SubModel>::Config: Send, <M as SubModel>::Config: Send,

§

impl<F, M> Sync for IqnConfig<F, M>where F: Sync, M: Sync, <F as SubModel>::Config: Sync, <M as SubModel>::Config: Sync,

§

impl<F, M> Unpin for IqnConfig<F, M>where F: Unpin, M: Unpin, <F as SubModel>::Config: Unpin, <M as SubModel>::Config: Unpin,

§

impl<F, M> UnwindSafe for IqnConfig<F, M>where F: UnwindSafe, M: UnwindSafe, <F as SubModel>::Config: UnwindSafe, <M as SubModel>::Config: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,