pub struct PreFabConfig<C>{
pub name: String,
pub description: String,
pub builder: Arc<dyn Fn() -> C + Send + Sync>,
pub weights: Option<PretrainedWeightsMap>,
}Expand description
A Config Well-Known Pre-Fab.
Fields§
§name: StringName of the model config pre-fab.
description: StringDescription of the model config pre-fab.
builder: Arc<dyn Fn() -> C + Send + Sync>Builder function for the config.
weights: Option<PretrainedWeightsMap>Pretrained weights map.
Implementations§
Source§impl<C> PreFabConfig<C>
impl<C> PreFabConfig<C>
Sourcepub fn lookup_pretrained_weights(
&self,
name: &str,
) -> Option<PretrainedWeightsDescriptor>
pub fn lookup_pretrained_weights( &self, name: &str, ) -> Option<PretrainedWeightsDescriptor>
Lookup a descriptor.
Sourcepub fn try_lookup_pretrained_weights(
&self,
name: &str,
) -> Result<PretrainedWeightsDescriptor>
pub fn try_lookup_pretrained_weights( &self, name: &str, ) -> Result<PretrainedWeightsDescriptor>
Lookup a descriptor.
Sourcepub fn expect_lookup_pretrained_weights(
&self,
name: &str,
) -> PretrainedWeightsDescriptor
pub fn expect_lookup_pretrained_weights( &self, name: &str, ) -> PretrainedWeightsDescriptor
Lookup a descriptor.
Trait Implementations§
Source§impl<C> Clone for PreFabConfig<C>
impl<C> Clone for PreFabConfig<C>
Source§fn clone(&self) -> PreFabConfig<C>
fn clone(&self) -> PreFabConfig<C>
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<C> Debug for PreFabConfig<C>
impl<C> Debug for PreFabConfig<C>
Source§impl<C> From<&StaticPreFabConfig<C>> for PreFabConfig<C>
impl<C> From<&StaticPreFabConfig<C>> for PreFabConfig<C>
Source§fn from(config: &StaticPreFabConfig<C>) -> Self
fn from(config: &StaticPreFabConfig<C>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<C> Freeze for PreFabConfig<C>
impl<C> !RefUnwindSafe for PreFabConfig<C>
impl<C> Send for PreFabConfig<C>
impl<C> Sync for PreFabConfig<C>
impl<C> Unpin for PreFabConfig<C>
impl<C> UnsafeUnpin for PreFabConfig<C>
impl<C> !UnwindSafe for PreFabConfig<C>
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