Package ai.djl.translate
Interface NoBatchifyTranslator<I,O>
-
- All Superinterfaces:
PostProcessor<O>,PreProcessor<I>,Translator<I,O>
- All Known Implementing Classes:
BigGANTranslator,QaServingTranslator,SpeechRecognitionTranslator,StyleTransferTranslator,TextClassificationServingTranslator,TextEmbeddingServingTranslator,TokenClassificationServingTranslator
public interface NoBatchifyTranslator<I,O> extends Translator<I,O>
ATranslatorthat does not use aBatchifier.There are two major cases for avoiding the use of a
Batchifier.First, you want to translate between
Batches rather thanRecords. For example, you might go from String[] to Int[].The second option is when using a model that does not use batching. Then, the model expects only a single record at a time.
- See Also:
Translator
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default BatchifiergetBatchifier()Returns theBatchifier.-
Methods inherited from interface ai.djl.translate.PostProcessor
processOutput
-
Methods inherited from interface ai.djl.translate.PreProcessor
processInput
-
Methods inherited from interface ai.djl.translate.Translator
getExpansions, prepare, toBatchTranslator, toBatchTranslator
-
-
-
-
Method Detail
-
getBatchifier
default Batchifier getBatchifier()
Returns theBatchifier.- Specified by:
getBatchifierin interfaceTranslator<I,O>- Returns:
- the
Batchifier
-
-