Package ai.djl.translate
Interface TranslatorOptions
public interface TranslatorOptions
A set of possible options for
Translators with different input and output types.-
Method Summary
Modifier and TypeMethodDescriptionReturns the supported wrap types.default booleanisSupported(Class<?> input, Class<?> output) Returns if the input/output is a supported wrap type.<I,O> Translator<I, O> Returns theTranslatoroption with the matching input and output type.
-
Method Details
-
getOptions
Returns the supported wrap types.- Returns:
- the supported wrap types
- See Also:
-
isSupported
Returns if the input/output is a supported wrap type.- Parameters:
input- the input classoutput- the output class- Returns:
trueif the input/output type is supported- See Also:
-
option
Returns theTranslatoroption with the matching input and output type.- Type Parameters:
I- the input data typeO- the output data type- Parameters:
input- the input classoutput- the output class- Returns:
- a new instance of the
Translatorclass - Throws:
TranslateException- if failed to create Translator instance
-