Package ai.djl.modality.cv.translator
Class ImageClassificationTranslatorFactory
- java.lang.Object
-
- ai.djl.translate.ExpansionTranslatorFactory<Image,Classifications>
-
- ai.djl.modality.cv.translator.ImageClassificationTranslatorFactory
-
- All Implemented Interfaces:
TranslatorFactory
public class ImageClassificationTranslatorFactory extends ExpansionTranslatorFactory<Image,Classifications>
ATranslatorFactory
that creates anImageClassificationTranslator
.
-
-
Constructor Summary
Constructors Constructor Description ImageClassificationTranslatorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Translator<Image,Classifications>
buildBaseTranslator(Model model, java.util.Map<java.lang.String,?> arguments)
Builds the base translator that can be expanded.protected java.util.Map<ai.djl.util.Pair<java.lang.reflect.Type,java.lang.reflect.Type>,java.util.function.Function<Translator<Image,Classifications>,Translator<?,?>>>
getExpansions()
Returns the possible expansions of this factory.-
Methods inherited from class ai.djl.translate.ExpansionTranslatorFactory
getSupportedTypes, newInstance, withTranslator
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ai.djl.translate.TranslatorFactory
isSupported
-
-
-
-
Method Detail
-
buildBaseTranslator
protected Translator<Image,Classifications> buildBaseTranslator(Model model, java.util.Map<java.lang.String,?> arguments)
Builds the base translator that can be expanded.- Specified by:
buildBaseTranslator
in classExpansionTranslatorFactory<Image,Classifications>
- Parameters:
model
- theModel
that uses theTranslator
arguments
- the configurations for a newTranslator
instance- Returns:
- a base translator that can be expanded to form the factory options
-
getExpansions
protected java.util.Map<ai.djl.util.Pair<java.lang.reflect.Type,java.lang.reflect.Type>,java.util.function.Function<Translator<Image,Classifications>,Translator<?,?>>> getExpansions()
Returns the possible expansions of this factory.- Specified by:
getExpansions
in classExpansionTranslatorFactory<Image,Classifications>
- Returns:
- the possible expansions of this factory
-
-