pub struct MirachModelConfig {
pub num_classes: usize,
pub num_heads: usize,
pub hidden_size1: usize,
pub hidden_size2: usize,
pub att_dropout: f64,
pub gf_dropout: f64,
}
Fields§
§num_classes: usize
§num_heads: usize
§att_dropout: f64
§gf_dropout: f64
Implementations§
Source§impl MirachModelConfig
impl MirachModelConfig
Sourcepub fn with_num_classes(self, num_classes: usize) -> Self
pub fn with_num_classes(self, num_classes: usize) -> Self
Set the default value for the field.
Sourcepub fn with_num_heads(self, num_heads: usize) -> Self
pub fn with_num_heads(self, num_heads: usize) -> Self
Set the default value for the field.
Set the default value for the field.
Set the default value for the field.
Sourcepub fn with_att_dropout(self, att_dropout: f64) -> Self
pub fn with_att_dropout(self, att_dropout: f64) -> Self
Set the default value for the field.
Sourcepub fn with_gf_dropout(self, gf_dropout: f64) -> Self
pub fn with_gf_dropout(self, gf_dropout: f64) -> Self
Set the default value for the field.
Source§impl MirachModelConfig
impl MirachModelConfig
pub fn init<B: Backend>(&self, device: &B::Device) -> MirachModel<B>
Trait Implementations§
Source§impl Clone for MirachModelConfig
impl Clone for MirachModelConfig
Source§impl Config for MirachModelConfig
impl Config for MirachModelConfig
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 MirachModelConfig
impl Debug for MirachModelConfig
Source§impl<'de> Deserialize<'de> for MirachModelConfig
impl<'de> Deserialize<'de> for MirachModelConfig
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 Display for MirachModelConfig
impl Display for MirachModelConfig
Auto Trait Implementations§
impl Freeze for MirachModelConfig
impl RefUnwindSafe for MirachModelConfig
impl Send for MirachModelConfig
impl Sync for MirachModelConfig
impl Unpin for MirachModelConfig
impl UnwindSafe for MirachModelConfig
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