Package ai.djl.translate
Interface PostProcessor<O>
-
- Type Parameters:
O- the type of the output object expected
- All Known Subinterfaces:
NoBatchifyTranslator<I,O>,ServingTranslator,StreamingTranslator<I,O>,Translator<I,O>
- All Known Implementing Classes:
BaseImageTranslator,BasicTranslator,BigGANTranslator,ImageClassificationTranslator,ImageFeatureExtractor,ImageServingTranslator,InstanceSegmentationTranslator,NoopTranslator,ObjectDetectionTranslator,QaServingTranslator,QATranslator,SemanticSegmentationTranslator,SimplePoseTranslator,SimpleText2TextTranslator,SingleShotDetectionTranslator,SpeechRecognitionTranslator,StyleTransferTranslator,TextClassificationServingTranslator,TextEmbeddingServingTranslator,TokenClassificationServingTranslator,YoloTranslator,YoloV5Translator,YoloV8Translator
public interface PostProcessor<O>An interface that provides post-processing functionality.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OprocessOutput(TranslatorContext ctx, NDList list)Processes the output NDList to the corresponding output object.
-
-
-
Method Detail
-
processOutput
O processOutput(TranslatorContext ctx, NDList list) throws java.lang.Exception
Processes the output NDList to the corresponding output object.- Parameters:
ctx- the toolkit used for post-processinglist- the output NDList after inference, usually immutable in engines like PyTorch. @see Issue 1774- Returns:
- the output object of expected type
- Throws:
java.lang.Exception- if an error occurs during processing output
-
-