pub struct WeightDecayConfig {
pub penalty: f32,
}Expand description
Configuration to create weight decay.
Fields§
§penalty: f32L2 penalty.
Implementations§
Trait Implementations§
Source§impl Clone for WeightDecayConfig
impl Clone for WeightDecayConfig
Source§fn clone(&self) -> WeightDecayConfig
fn clone(&self) -> WeightDecayConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Config for WeightDecayConfig
impl Config for WeightDecayConfig
Source§fn load<P>(file: P) -> Result<Self, ConfigError>
fn load<P>(file: P) -> Result<Self, ConfigError>
Loads the configuration from a file. Read more
Source§fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
Loads the configuration from a binary buffer. Read more
Source§impl Debug for WeightDecayConfig
impl Debug for WeightDecayConfig
Source§impl<'de> Deserialize<'de> for WeightDecayConfig
impl<'de> Deserialize<'de> for WeightDecayConfig
Source§fn deserialize<D>(
deserializer: D,
) -> Result<WeightDecayConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<WeightDecayConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for WeightDecayConfig
impl Display for WeightDecayConfig
Source§impl Serialize for WeightDecayConfig
impl Serialize for WeightDecayConfig
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
Auto Trait Implementations§
impl Freeze for WeightDecayConfig
impl RefUnwindSafe for WeightDecayConfig
impl Send for WeightDecayConfig
impl Sync for WeightDecayConfig
impl Unpin for WeightDecayConfig
impl UnsafeUnpin for WeightDecayConfig
impl UnwindSafe for WeightDecayConfig
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