Interface StreamingTranslator<I,​O>

    • Method Detail

      • processStreamOutput

        O processStreamOutput​(TranslatorContext ctx,
                              java.util.stream.Stream<NDList> list)
                       throws java.lang.Exception
        Processes the output NDList to the corresponding output object.
        Parameters:
        ctx - the toolkit used for post-processing
        list - 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