public static enum LossFunctions.Reduction extends Enum<LossFunctions.Reduction>
Enum Constant and Description |
---|
MEAN_BY_COUNT
Weighted mean: sum(weights * loss) / count(weights != 0)
Example: 2d input, MSE loss along dimension 1.
|
MEAN_BY_WEIGHT
Weighted mean: sum(weights * loss) / sum(weights)
Example: 2d input, MSE loss along dimension 1.
|
NONE
No reduction.
|
SPECIFIED_DIMS
Reduce as normal along the specified dimensions, but don't sum/mean etc the remaining
dimensions.
|
SUM
Sum across the remaining dimensions, returning a scalar
Example: 2d input, MSE loss along dimension 1.
|
Modifier and Type | Method and Description |
---|---|
static LossFunctions.Reduction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LossFunctions.Reduction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LossFunctions.Reduction NONE
public static final LossFunctions.Reduction SPECIFIED_DIMS
public static final LossFunctions.Reduction SUM
public static final LossFunctions.Reduction MEAN_BY_WEIGHT
public static final LossFunctions.Reduction MEAN_BY_COUNT
public static LossFunctions.Reduction[] values()
for (LossFunctions.Reduction c : LossFunctions.Reduction.values()) System.out.println(c);
public static LossFunctions.Reduction valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2018. All rights reserved.