pub struct GruConfig {
pub d_input: usize,
pub d_hidden: usize,
pub bias: bool,
pub initializer: Initializer,
}Expand description
The configuration for a gru module.
Fields§
§d_input: usizeThe size of the input features.
The size of the hidden state.
bias: boolIf a bias should be applied during the Gru transformation.
initializer: InitializerGru initializer
Implementations§
source§impl GruConfig
impl GruConfig
sourcepub fn with_initializer(self, initializer: Initializer) -> Self
pub fn with_initializer(self, initializer: Initializer) -> Self
Gru initializer
Trait Implementations§
source§impl Config for GruConfig
impl Config for GruConfig
source§fn save<P: AsRef<Path>>(&self, file: P) -> Result<()>
fn save<P: AsRef<Path>>(&self, file: P) -> Result<()>
Saves the configuration to a file. Read more
source§fn load<P: AsRef<Path>>(file: P) -> Result<Self, ConfigError>
fn load<P: AsRef<Path>>(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<'de> Deserialize<'de> for GruConfig
impl<'de> Deserialize<'de> for GruConfig
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
Auto Trait Implementations§
impl RefUnwindSafe for GruConfig
impl Send for GruConfig
impl Sync for GruConfig
impl Unpin for GruConfig
impl UnwindSafe for GruConfig
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