pub enum ModelVariant {
Baseline,
DdlVector,
DdlMatrixToken,
DdlMatrixTokenEc,
DdlMatrixChannel,
DdlMatrixChannelEc,
}Variants§
Implementations§
Source§impl ModelVariant
impl ModelVariant
pub const ALL: [Self; 6]
pub fn all() -> &'static [Self]
pub fn slug(&self) -> &'static str
pub fn uses_ddl(&self) -> bool
pub fn resolve_config(&self, base_config: &DdlConfig) -> DdlConfig
pub fn init_model<B: Backend>( &self, resolved_config: &DdlConfig, device: &B::Device, ) -> ModelInstance<B>
pub fn build<B: Backend>( &self, base_config: &DdlConfig, device: &B::Device, ) -> (DdlConfig, ModelInstance<B>)
Trait Implementations§
Source§impl Clone for ModelVariant
impl Clone for ModelVariant
Source§fn clone(&self) -> ModelVariant
fn clone(&self) -> ModelVariant
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 Debug for ModelVariant
impl Debug for ModelVariant
Source§impl<'de> Deserialize<'de> for ModelVariant
impl<'de> Deserialize<'de> for ModelVariant
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 PartialEq for ModelVariant
impl PartialEq for ModelVariant
Source§impl Serialize for ModelVariant
impl Serialize for ModelVariant
impl Copy for ModelVariant
impl Eq for ModelVariant
impl StructuralPartialEq for ModelVariant
Auto Trait Implementations§
impl Freeze for ModelVariant
impl RefUnwindSafe for ModelVariant
impl Send for ModelVariant
impl Sync for ModelVariant
impl Unpin for ModelVariant
impl UnsafeUnpin for ModelVariant
impl UnwindSafe for ModelVariant
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.