pub enum OptimizationMessage {
ParameterUpdate {
worker_id: usize,
parameters: HashMap<String, Array2<Float>>,
gradient: HashMap<String, Array2<Float>>,
loss: Float,
},
ComputeGradient {
worker_id: usize,
data_batch: Array2<Float>,
labels_batch: Array1<usize>,
},
CheckConvergence {
worker_id: usize,
current_loss: Float,
},
TrainingComplete {
final_parameters: HashMap<String, Array2<Float>>,
final_loss: Float,
iterations: usize,
},
OptimizationError {
worker_id: usize,
error: String,
},
}Expand description
Message types for async optimization communication
Variants§
ParameterUpdate
Parameter update request
Fields
ComputeGradient
Gradient computation request
CheckConvergence
Convergence check request
TrainingComplete
Training completion signal
OptimizationError
Error occurred during optimization
Trait Implementations§
Source§impl Clone for OptimizationMessage
impl Clone for OptimizationMessage
Source§fn clone(&self) -> OptimizationMessage
fn clone(&self) -> OptimizationMessage
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 OptimizationMessage
impl RefUnwindSafe for OptimizationMessage
impl Send for OptimizationMessage
impl Sync for OptimizationMessage
impl Unpin for OptimizationMessage
impl UnsafeUnpin for OptimizationMessage
impl UnwindSafe for OptimizationMessage
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