pub struct SurfaceModelConfig<T = f64> { /* private fields */ }Expand description
Hyperparameters for the multi-layer perceptron model
Implementations§
Source§impl<T> SurfaceModelConfig<T>
impl<T> SurfaceModelConfig<T>
pub fn new(learning_rate: T, momentum: T, decay: T) -> Self
Sourcepub const fn decay_mut(&mut self) -> &mut T
pub const fn decay_mut(&mut self) -> &mut T
returns a mutable reference to the decay of the model
Sourcepub const fn learning_rate(&self) -> &T
pub const fn learning_rate(&self) -> &T
returns a reference to the learning rate of the model
Sourcepub const fn learning_rate_mut(&mut self) -> &mut T
pub const fn learning_rate_mut(&mut self) -> &mut T
returns a mutable reference to the learning rate of the model
Sourcepub const fn momentum_mut(&mut self) -> &mut T
pub const fn momentum_mut(&mut self) -> &mut T
returns a mutable reference to the momentum of the model
Sourcepub fn set_decay(&mut self, decay: T) -> &mut Self
pub fn set_decay(&mut self, decay: T) -> &mut Self
update the decay and return a mutable reference to the config
Sourcepub fn set_learning_rate(&mut self, learning_rate: T) -> &mut Self
pub fn set_learning_rate(&mut self, learning_rate: T) -> &mut Self
update the learning rate and return a mutable reference to the config
Sourcepub fn set_momentum(&mut self, momentum: T) -> &mut Self
pub fn set_momentum(&mut self, momentum: T) -> &mut Self
update the momentum and return a mutable reference to the config
Sourcepub fn with_decay(self, decay: T) -> Self
pub fn with_decay(self, decay: T) -> Self
consumes the current instance to create another with the given decay
Sourcepub fn with_learning_rate(self, learning_rate: T) -> Self
pub fn with_learning_rate(self, learning_rate: T) -> Self
consumes the current instance to create another with the given learning rate
Sourcepub fn with_momentum(self, momentum: T) -> Self
pub fn with_momentum(self, momentum: T) -> Self
consumes the current instance to create another with the given momentum
Trait Implementations§
Source§impl<T: Clone> Clone for SurfaceModelConfig<T>
impl<T: Clone> Clone for SurfaceModelConfig<T>
Source§fn clone(&self) -> SurfaceModelConfig<T>
fn clone(&self) -> SurfaceModelConfig<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for SurfaceModelConfig<T>
impl<T: Debug> Debug for SurfaceModelConfig<T>
Source§impl<T> Default for SurfaceModelConfig<T>where
T: FromPrimitive,
impl<T> Default for SurfaceModelConfig<T>where
T: FromPrimitive,
Source§impl<'de, T> Deserialize<'de> for SurfaceModelConfig<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for SurfaceModelConfig<T>where
T: Deserialize<'de>,
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
Source§impl<T: Hash> Hash for SurfaceModelConfig<T>
impl<T: Hash> Hash for SurfaceModelConfig<T>
Source§impl<T: Ord> Ord for SurfaceModelConfig<T>
impl<T: Ord> Ord for SurfaceModelConfig<T>
Source§fn cmp(&self, other: &SurfaceModelConfig<T>) -> Ordering
fn cmp(&self, other: &SurfaceModelConfig<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialEq> PartialEq for SurfaceModelConfig<T>
impl<T: PartialEq> PartialEq for SurfaceModelConfig<T>
Source§impl<T: PartialOrd> PartialOrd for SurfaceModelConfig<T>
impl<T: PartialOrd> PartialOrd for SurfaceModelConfig<T>
Source§impl<T> Serialize for SurfaceModelConfig<T>where
T: Serialize,
impl<T> Serialize for SurfaceModelConfig<T>where
T: Serialize,
impl<T: Copy> Copy for SurfaceModelConfig<T>
impl<T: Eq> Eq for SurfaceModelConfig<T>
impl<T> StructuralPartialEq for SurfaceModelConfig<T>
Auto Trait Implementations§
impl<T> Freeze for SurfaceModelConfig<T>where
T: Freeze,
impl<T> RefUnwindSafe for SurfaceModelConfig<T>where
T: RefUnwindSafe,
impl<T> Send for SurfaceModelConfig<T>where
T: Send,
impl<T> Sync for SurfaceModelConfig<T>where
T: Sync,
impl<T> Unpin for SurfaceModelConfig<T>where
T: Unpin,
impl<T> UnwindSafe for SurfaceModelConfig<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<K, S> Identity<K> for Swhere
S: Borrow<K>,
K: Identifier,
impl<K, S> Identity<K> for Swhere
S: Borrow<K>,
K: Identifier,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoWeight<T> for T
impl<T> IntoWeight<T> for T
fn into_weight(self) -> Weight<T>
Source§impl<A, B, C> PercentDifference<B> for A
impl<A, B, C> PercentDifference<B> for A
type Output = C
Source§fn percent_diff(self, rhs: B) -> <A as PercentDifference<B>>::Output
fn percent_diff(self, rhs: B) -> <A as PercentDifference<B>>::Output
Computes the percent difference between two values.