xref: /aosp_15_r20/external/pytorch/aten/src/ATen/core/Reduction.h (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #pragma once
2 
3 namespace at::Reduction {
4 
5 // NB: Keep this in sync with Reduction class in torch/nn/_reduction.py
6 // These constants control the reduction behavior of loss functions.
7 // Ideally, this would be a scoped enum, but jit doesn't support that
8 enum Reduction {
9   None, // Do not reduce
10   Mean, // (Possibly weighted) mean of losses
11   Sum, // Sum losses
12   END
13 };
14 } // namespace at::Reduction
15