pub struct PretrainedWeightsDescriptor {
pub name: String,
pub description: String,
pub license: Option<String>,
pub origin: Option<String>,
pub urls: Vec<String>,
}Expand description
A descriptor for a pretrained weights file.
Fields§
§name: StringName of the model.
description: StringDescription of the model.
license: Option<String>License.
origin: Option<String>Source URL.
urls: Vec<String>URL to download the weights from.
Implementations§
Source§impl PretrainedWeightsDescriptor
impl PretrainedWeightsDescriptor
Sourcepub fn fetch_weights(&self, disk_cache: &DiskCacheConfig) -> Result<PathBuf>
pub fn fetch_weights(&self, disk_cache: &DiskCacheConfig) -> Result<PathBuf>
Trait Implementations§
Source§impl Clone for PretrainedWeightsDescriptor
impl Clone for PretrainedWeightsDescriptor
Source§fn clone(&self) -> PretrainedWeightsDescriptor
fn clone(&self) -> PretrainedWeightsDescriptor
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 Debug for PretrainedWeightsDescriptor
impl Debug for PretrainedWeightsDescriptor
Source§impl<'de> Deserialize<'de> for PretrainedWeightsDescriptor
impl<'de> Deserialize<'de> for PretrainedWeightsDescriptor
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 From<&StaticPretrainedWeightsDescriptor<'_>> for PretrainedWeightsDescriptor
impl From<&StaticPretrainedWeightsDescriptor<'_>> for PretrainedWeightsDescriptor
Source§fn from(descriptor: &StaticPretrainedWeightsDescriptor<'_>) -> Self
fn from(descriptor: &StaticPretrainedWeightsDescriptor<'_>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PretrainedWeightsDescriptor
impl PartialEq for PretrainedWeightsDescriptor
Source§fn eq(&self, other: &PretrainedWeightsDescriptor) -> bool
fn eq(&self, other: &PretrainedWeightsDescriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PretrainedWeightsDescriptor
impl StructuralPartialEq for PretrainedWeightsDescriptor
Auto Trait Implementations§
impl Freeze for PretrainedWeightsDescriptor
impl RefUnwindSafe for PretrainedWeightsDescriptor
impl Send for PretrainedWeightsDescriptor
impl Sync for PretrainedWeightsDescriptor
impl Unpin for PretrainedWeightsDescriptor
impl UnsafeUnpin for PretrainedWeightsDescriptor
impl UnwindSafe for PretrainedWeightsDescriptor
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.