pub struct FeatureExtractorMode {
pub feature_extractor_name: String,
pub head_name: String,
}Expand description
Feature extraction mode: freeze entire feature extractor.
Only trains the final classification/regression head.
Fields§
§feature_extractor_name: StringName of the feature extractor (typically all layers except last).
head_name: StringName of the head/classifier (typically the last layer).
Implementations§
Source§impl FeatureExtractorMode
impl FeatureExtractorMode
Sourcepub fn new(feature_extractor_name: String, head_name: String) -> Self
pub fn new(feature_extractor_name: String, head_name: String) -> Self
Create a new feature extractor mode.
§Arguments
feature_extractor_name- Name/prefix of feature extractor layershead_name- Name/prefix of head layers
Sourcepub fn is_feature_extractor(&self, layer_name: &str) -> bool
pub fn is_feature_extractor(&self, layer_name: &str) -> bool
Sourcepub fn get_freezing_config(&self, all_layers: &[String]) -> LayerFreezingConfig
pub fn get_freezing_config(&self, all_layers: &[String]) -> LayerFreezingConfig
Trait Implementations§
Source§impl Clone for FeatureExtractorMode
impl Clone for FeatureExtractorMode
Source§fn clone(&self) -> FeatureExtractorMode
fn clone(&self) -> FeatureExtractorMode
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 moreAuto Trait Implementations§
impl Freeze for FeatureExtractorMode
impl RefUnwindSafe for FeatureExtractorMode
impl Send for FeatureExtractorMode
impl Sync for FeatureExtractorMode
impl Unpin for FeatureExtractorMode
impl UnwindSafe for FeatureExtractorMode
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