Skip to main content

GradientAggregator

Trait GradientAggregator 

Source
pub trait GradientAggregator {
    // Required method
    fn aggregate(
        &self,
        gradients: &[HashMap<String, Value>],
    ) -> Result<HashMap<String, Value>>;
}
Expand description

Contract for gradient aggregation across workers.

Required Methods§

Source

fn aggregate( &self, gradients: &[HashMap<String, Value>], ) -> Result<HashMap<String, Value>>

Combine per-worker gradients (keyed by node id) into the one set every worker then applies.

Implementations on Foreign Types§

Source§

impl GradientAggregator for GradientAggregation

Source§

fn aggregate( &self, gradients: &[HashMap<String, Value>], ) -> Result<HashMap<String, Value>>

Implementors§