pub struct ArchSearchSpace {
pub min_depth: usize,
pub max_depth: usize,
pub width_options: Vec<usize>,
pub activation_options: Vec<String>,
pub op_options: Vec<String>,
}Expand description
Defines the search space over neural architectures.
Constrains depth range, layer width choices, activation functions, and operation types that can appear in any sampled architecture.
Fields§
§min_depth: usizeMinimum number of layers (inclusive, ≥ 1).
max_depth: usizeMaximum number of layers (inclusive, ≥ min_depth).
width_options: Vec<usize>Allowed width (hidden-unit count) options per layer.
activation_options: Vec<String>Allowed activation function names per layer.
op_options: Vec<String>Allowed operation type names per layer.
Implementations§
Source§impl ArchSearchSpace
impl ArchSearchSpace
Sourcepub fn new(
min_depth: usize,
max_depth: usize,
width_options: Vec<usize>,
activation_options: Vec<String>,
op_options: Vec<String>,
) -> TrainResult<Self>
pub fn new( min_depth: usize, max_depth: usize, width_options: Vec<usize>, activation_options: Vec<String>, op_options: Vec<String>, ) -> TrainResult<Self>
Construct a validated ArchSearchSpace.
§Errors
Returns TrainError::InvalidParameter if:
min_depth< 1max_depth<min_depth- any of the option vecs is empty
Trait Implementations§
Source§impl Clone for ArchSearchSpace
impl Clone for ArchSearchSpace
Source§fn clone(&self) -> ArchSearchSpace
fn clone(&self) -> ArchSearchSpace
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 moreAuto Trait Implementations§
impl Freeze for ArchSearchSpace
impl RefUnwindSafe for ArchSearchSpace
impl Send for ArchSearchSpace
impl Sync for ArchSearchSpace
impl Unpin for ArchSearchSpace
impl UnsafeUnpin for ArchSearchSpace
impl UnwindSafe for ArchSearchSpace
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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