Package ai.djl.translate
Interface Ensembleable<T>
-
- All Known Implementing Classes:
Classifications
,DetectedObjects
public interface Ensembleable<T>
Represents a class that can be ensembled (or averaged).Typically, ensembling is used for the output of models/translators. By averaging multiple models, it is often possible to get greater accuracy then running each model individually.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <T extends Ensembleable<T>>
Tensemble(java.util.List<T> outputs)
Finds the ensemble of a list of outputs.T
ensembleWith(java.util.Iterator<T> iterator)
Creates an ensembled output with a list of outputs.
-
-
-
Method Detail
-
ensembleWith
T ensembleWith(java.util.Iterator<T> iterator)
Creates an ensembled output with a list of outputs.- Parameters:
iterator
- the outputs to ensemble with. It uses the caller class to determine how to ensemble.- Returns:
- the ensembled (averaged) output
-
ensemble
static <T extends Ensembleable<T>> T ensemble(java.util.List<T> outputs)
Finds the ensemble of a list of outputs.- Type Parameters:
T
- the type of object to ensemble. Usually also the type returned- Parameters:
outputs
- the outputs to ensemble.- Returns:
- the ensembled (averaged) output
-
-