Package ai.djl.translate
Class NoopServingTranslatorFactory
java.lang.Object
ai.djl.translate.NoopServingTranslatorFactory
- All Implemented Interfaces:
TranslatorFactory
A
TranslatorFactory
that creates a RawTranslator
instance.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns supported input/output classes.<I,
O> Translator<I, O> Returns a new instance of theTranslator
class.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
-
Constructor Details
-
NoopServingTranslatorFactory
public NoopServingTranslatorFactory()
-
-
Method Details
-
getSupportedTypes
Returns supported input/output classes.- Specified by:
getSupportedTypes
in interfaceTranslatorFactory
- Returns:
- a set of supported input/output classes
-
newInstance
public <I,O> Translator<I,O> newInstance(Class<I> input, Class<O> output, Model model, Map<String, ?> arguments) Returns a new instance of theTranslator
class.- Specified by:
newInstance
in interfaceTranslatorFactory
- Type Parameters:
I
- the input data typeO
- the output data type- Parameters:
input
- the input classoutput
- the output classmodel
- theModel
that uses theTranslator
arguments
- the configurations for a newTranslator
instance- Returns:
- a new instance of the
Translator
class
-