pub enum HyperParams<T = f64> {
Decay(T),
Dropout(T),
LearningRate(T),
Momentum(T),
Temperature(T),
WeightDecay(T),
Unknown(KeyValue<String, T>),
}Variants§
Decay(T)
Dropout(T)
LearningRate(T)
Momentum(T)
Temperature(T)
WeightDecay(T)
Unknown(KeyValue<String, T>)
Implementations§
Source§impl<T> HyperParams<T>
impl<T> HyperParams<T>
Sourcepub const fn is_decay(&self) -> bool
pub const fn is_decay(&self) -> bool
Returns true if the enum is HyperParams::Decay otherwise false
Sourcepub const fn is_dropout(&self) -> bool
pub const fn is_dropout(&self) -> bool
Returns true if the enum is HyperParams::Dropout otherwise false
Sourcepub const fn is_learning_rate(&self) -> bool
pub const fn is_learning_rate(&self) -> bool
Returns true if the enum is HyperParams::LearningRate otherwise false
Sourcepub const fn is_momentum(&self) -> bool
pub const fn is_momentum(&self) -> bool
Returns true if the enum is HyperParams::Momentum otherwise false
Sourcepub const fn is_temperature(&self) -> bool
pub const fn is_temperature(&self) -> bool
Returns true if the enum is HyperParams::Temperature otherwise false
Sourcepub const fn is_weight_decay(&self) -> bool
pub const fn is_weight_decay(&self) -> bool
Returns true if the enum is HyperParams::WeightDecay otherwise false
Sourcepub const fn is_unknown(&self) -> bool
pub const fn is_unknown(&self) -> bool
Returns true if the enum is HyperParams::Unknown otherwise false
Trait Implementations§
Source§impl<T> Clone for HyperParams<T>where
T: Clone,
impl<T> Clone for HyperParams<T>where
T: Clone,
Source§fn clone(&self) -> HyperParams<T>
fn clone(&self) -> HyperParams<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> Debug for HyperParams<T>where
T: Debug,
impl<T> Debug for HyperParams<T>where
T: Debug,
Source§impl<'de, T> Deserialize<'de> for HyperParams<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for HyperParams<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<HyperParams<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<HyperParams<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'_enum, T> From<&'_enum HyperParams<T>> for Hyperparameters
impl<'_enum, T> From<&'_enum HyperParams<T>> for Hyperparameters
Source§fn from(val: &'_enum HyperParams<T>) -> Hyperparameters
fn from(val: &'_enum HyperParams<T>) -> Hyperparameters
Converts to this type from the input type.
Source§impl<T> From<HyperParams<T>> for Hyperparameters
impl<T> From<HyperParams<T>> for Hyperparameters
Source§fn from(val: HyperParams<T>) -> Hyperparameters
fn from(val: HyperParams<T>) -> Hyperparameters
Converts to this type from the input type.
Source§impl<T> Hash for HyperParams<T>where
T: Hash,
impl<T> Hash for HyperParams<T>where
T: Hash,
Source§impl<T> IntoDiscriminant for HyperParams<T>
impl<T> IntoDiscriminant for HyperParams<T>
Source§type Discriminant = Hyperparameters
type Discriminant = Hyperparameters
Enum listing the same variants as this enum but without any data fields
fn discriminant(&self) -> <HyperParams<T> as IntoDiscriminant>::Discriminant
Source§impl<T> Ord for HyperParams<T>where
T: Ord,
impl<T> Ord for HyperParams<T>where
T: Ord,
Source§fn cmp(&self, other: &HyperParams<T>) -> Ordering
fn cmp(&self, other: &HyperParams<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 for HyperParams<T>where
T: PartialEq,
impl<T> PartialEq for HyperParams<T>where
T: PartialEq,
Source§impl<T> PartialOrd for HyperParams<T>where
T: PartialOrd,
impl<T> PartialOrd for HyperParams<T>where
T: PartialOrd,
Source§impl<T> Serialize for HyperParams<T>where
T: Serialize,
impl<T> Serialize for HyperParams<T>where
T: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> Eq for HyperParams<T>where
T: Eq,
impl<T> StructuralPartialEq for HyperParams<T>
Auto Trait Implementations§
impl<T> Freeze for HyperParams<T>where
T: Freeze,
impl<T> RefUnwindSafe for HyperParams<T>where
T: RefUnwindSafe,
impl<T> Send for HyperParams<T>where
T: Send,
impl<T> Sync for HyperParams<T>where
T: Sync,
impl<T> Unpin for HyperParams<T>where
T: Unpin,
impl<T> UnwindSafe for HyperParams<T>where
T: 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
Source§impl<T> CallInPlace<T> for Twhere
T: CallInto<T>,
impl<T> CallInPlace<T> for Twhere
T: CallInto<T>,
Source§fn call_inplace<F>(&mut self, f: F) -> <T as CallInto<T>>::Output
fn call_inplace<F>(&mut self, f: F) -> <T as CallInto<T>>::Output
The
call_on_mut method allows an object to be passed onto a function that takes a mutable reference
to the object. This is useful for cases where you want to perform an operation on
an object and mutate it in the process.Source§impl<T> CallInto<T> for T
impl<T> CallInto<T> for T
Source§impl<T> CallOn<T> for Twhere
T: CallInto<T>,
impl<T> CallOn<T> for Twhere
T: CallInto<T>,
Source§fn call_on<F>(&self, f: F) -> <T as CallInto<T>>::Output
fn call_on<F>(&self, f: F) -> <T as CallInto<T>>::Output
The
call_on method allows an object to be passed onto a function that takes a reference
to the object. This is useful for cases where you want to perform an operation on
an object without needing to extract it from a container or context.