pub struct ENAS {
pub shared_weights: HashMap<Operation, Tensor>,
pub controller_state: Vec<f32>,
pub architecture_pool: Vec<(Cell, f32)>,
pub num_samples: usize,
}Expand description
ENAS (Efficient Neural Architecture Search)
Fields§
Shared weights for all operations
controller_state: Vec<f32>Controller RNN state
architecture_pool: Vec<(Cell, f32)>Sampled architectures and their rewards
num_samples: usizeNumber of architectures to sample per iteration
Implementations§
Source§impl ENAS
impl ENAS
Sourcepub fn sample_architecture(&mut self, num_nodes: usize) -> Cell
pub fn sample_architecture(&mut self, num_nodes: usize) -> Cell
Sample an architecture using the controller
Sourcepub fn train_step(&mut self, num_nodes: usize) -> f32
pub fn train_step(&mut self, num_nodes: usize) -> f32
Train sampled architectures and update controller
Sourcepub fn best_architecture(&self) -> Option<&Cell>
pub fn best_architecture(&self) -> Option<&Cell>
Get best architecture found so far
Auto Trait Implementations§
impl Freeze for ENAS
impl !RefUnwindSafe for ENAS
impl Send for ENAS
impl Sync for ENAS
impl Unpin for ENAS
impl !UnwindSafe for ENAS
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> 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