pub struct EdaState<B: Backend, MS> {
pub model_state: MS,
pub best_genome: Option<Tensor<B, 1>>,
pub best_fitness_ever: f32,
pub generation: usize,
}Expand description
Generation-to-generation state carried by EdaStrategy.
The driver updates this in tell and passes it back through ask unchanged.
Callers should treat it as an opaque blob; the public fields are exposed to
enable checkpointing and observability, not mutation.
Fields§
§model_state: MSCurrent fitted model state (updated once per EdaStrategy::tell call).
best_genome: Option<Tensor<B, 1>>Best genome ever observed, shape (genome_dim,). None before the
first EdaStrategy::tell call.
best_fitness_ever: f32Largest (best) fitness ever observed across all generations
(canonical maximise convention). Starts at f32::NEG_INFINITY.
generation: usizeNumber of completed generations (incremented by each tell call).
Trait Implementations§
Auto Trait Implementations§
impl<B, MS> Freeze for EdaState<B, MS>where
MS: Freeze,
<B as BackendTypes>::FloatTensorPrimitive: Freeze,
<B as BackendTypes>::QuantizedTensorPrimitive: Freeze,
impl<B, MS> RefUnwindSafe for EdaState<B, MS>where
MS: RefUnwindSafe,
<B as BackendTypes>::FloatTensorPrimitive: RefUnwindSafe,
<B as BackendTypes>::QuantizedTensorPrimitive: RefUnwindSafe,
impl<B, MS> Send for EdaState<B, MS>where
MS: Send,
impl<B, MS> Sync for EdaState<B, MS>where
MS: Sync,
impl<B, MS> Unpin for EdaState<B, MS>where
MS: Unpin,
<B as BackendTypes>::FloatTensorPrimitive: Unpin,
<B as BackendTypes>::QuantizedTensorPrimitive: Unpin,
impl<B, MS> UnsafeUnpin for EdaState<B, MS>where
MS: UnsafeUnpin,
<B as BackendTypes>::FloatTensorPrimitive: UnsafeUnpin,
<B as BackendTypes>::QuantizedTensorPrimitive: UnsafeUnpin,
impl<B, MS> UnwindSafe for EdaState<B, MS>where
MS: UnwindSafe,
<B as BackendTypes>::FloatTensorPrimitive: UnwindSafe,
<B as BackendTypes>::QuantizedTensorPrimitive: UnwindSafe,
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<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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