Enum Perturb
#[non_exhaustive]pub enum Perturb {
Factors {
down: f64,
up: f64,
},
}Expand description
How a scalar hyperparameter is perturbed during the explore step. This enum may gain variants; downstream matches must handle unknown variants.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Factors
Multiply each scalar by one of two factors, chosen per parameter by the
seeded RNG (Jaderberg et al.: 0.8 or 1.2). Integer parameters are
scaled, rounded to the nearest integer, and — like floats — clamped back
into the parameter’s recorded bounds so a fork never leaves the search
space. down must be finite and in (0, 1) and up finite and greater
than 1; malformed public enum values are rejected when a report uses
the scheduler.
Implementations§
§impl Perturb
impl Perturb
pub const fn new_with_factors(down: f64, up: f64) -> Self
pub const fn new_with_factors(down: f64, up: f64) -> Self
Multiply each scalar by down or up, chosen at random per parameter.
Trait Implementations§
impl Copy for Perturb
impl StructuralPartialEq for Perturb
Auto Trait Implementations§
impl Freeze for Perturb
impl RefUnwindSafe for Perturb
impl Send for Perturb
impl Sync for Perturb
impl Unpin for Perturb
impl UnsafeUnpin for Perturb
impl UnwindSafe for Perturb
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