burn_std/distributed.rs
1use serde::{Deserialize, Serialize};
2
3/// The different ways to execute the reduce operation.
4#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy, Serialize, Deserialize)]
5pub enum ReduceOperation {
6 /// The sum of the values.
7 Sum,
8 /// The mean of the values.
9 Mean,
10}
11
12/// Parameter struct for setting up and getting parameters for distributed operations.
13#[derive(Clone, Debug)]
14pub struct DistributedConfig {
15 /// How to execute the all_reduce operation.
16 pub all_reduce_op: ReduceOperation,
17}