Enum RestartMode
pub enum RestartMode {
Fresh,
ShrinkPerturb {
shrink: f64,
noise: f64,
},
}Expand description
How a Decision::Restart child begins.
atune never touches learner state: the mode travels to the objective
through TrialCtx::restart (and, for a
subprocess trial, the ATUNE_RESTART_* environment variables), and the
objective applies it.
Variants§
Fresh
Re-initialize from scratch with the donor’s (mutated) configuration and no checkpoint.
ShrinkPerturb
Load the donor’s checkpoint, then shrink its weights toward zero by
shrink and add noise of scale noise (Ash & Adams’ shrink-and-perturb).
Implementations§
§impl RestartMode
impl RestartMode
pub fn try_new_with_shrink_perturb(shrink: f64, noise: f64) -> Result<Self>
pub fn try_new_with_shrink_perturb(shrink: f64, noise: f64) -> Result<Self>
pub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Checks the mode’s parameters.
§Errors
Error::Scheduler if shrink is not in (0, 1] or noise is not
finite and non-negative.
pub const fn inherits_checkpoint(&self) -> bool
pub const fn inherits_checkpoint(&self) -> bool
true for a mode whose child starts from the donor’s checkpoint.
Trait Implementations§
§impl Clone for RestartMode
impl Clone for RestartMode
§fn clone(&self) -> RestartMode
fn clone(&self) -> RestartMode
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 moreimpl Copy for RestartMode
§impl Debug for RestartMode
impl Debug for RestartMode
§impl<'de> Deserialize<'de> for RestartMode
impl<'de> Deserialize<'de> for RestartMode
§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
§impl PartialEq for RestartMode
impl PartialEq for RestartMode
§impl Serialize for RestartMode
impl Serialize for RestartMode
impl StructuralPartialEq for RestartMode
Auto Trait Implementations§
impl Freeze for RestartMode
impl RefUnwindSafe for RestartMode
impl Send for RestartMode
impl Sync for RestartMode
impl Unpin for RestartMode
impl UnsafeUnpin for RestartMode
impl UnwindSafe for RestartMode
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