pub struct ArchitectureConfig {
pub input_channels: usize,
pub num_classes: usize,
pub stage_channels: Vec<usize>,
pub blocks_per_stage: Vec<usize>,
}Expand description
Describes the shape of a model architecture.
Fields§
§input_channels: usizeNumber of input channels (typically 3 for RGB).
num_classes: usizeNumber of output classes (default 1000 for ImageNet).
stage_channels: Vec<usize>Channel widths per stage.
blocks_per_stage: Vec<usize>Block counts per stage.
Implementations§
Source§impl ArchitectureConfig
impl ArchitectureConfig
Sourcepub fn with_num_classes(&self, num_classes: usize) -> Self
pub fn with_num_classes(&self, num_classes: usize) -> Self
Returns a copy with a different number of output classes.
Trait Implementations§
Source§impl Clone for ArchitectureConfig
impl Clone for ArchitectureConfig
Source§fn clone(&self) -> ArchitectureConfig
fn clone(&self) -> ArchitectureConfig
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 ArchitectureConfig
impl Debug for ArchitectureConfig
Source§impl<'de> Deserialize<'de> for ArchitectureConfig
impl<'de> Deserialize<'de> for ArchitectureConfig
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 ArchitectureConfig
impl PartialEq for ArchitectureConfig
Source§impl Serialize for ArchitectureConfig
impl Serialize for ArchitectureConfig
impl Eq for ArchitectureConfig
impl StructuralPartialEq for ArchitectureConfig
Auto Trait Implementations§
impl Freeze for ArchitectureConfig
impl RefUnwindSafe for ArchitectureConfig
impl Send for ArchitectureConfig
impl Sync for ArchitectureConfig
impl Unpin for ArchitectureConfig
impl UnsafeUnpin for ArchitectureConfig
impl UnwindSafe for ArchitectureConfig
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more