Skip to main content

burn_nn/loss/
reduction.rs

1use burn_core as burn;
2
3use burn::config::Config;
4
5/// The reduction type for the loss.
6#[derive(Config, Debug)]
7pub enum Reduction {
8    /// The mean of the losses will be returned.
9    Mean,
10
11    /// The sum of the losses will be returned.
12    Sum,
13
14    /// The sum of the losses divided by the batch_size will be returned.
15    BatchMean,
16
17    /// The mean of the losses will be returned.
18    Auto,
19}