Interface Translator<I,​O>

    • Method Detail

      • prepare

        default void prepare​(TranslatorContext ctx)
                      throws java.lang.Exception
        Prepares the translator with the manager and model to use.
        Parameters:
        ctx - the context for the Predictor.
        Throws:
        java.lang.Exception - if there is an error for preparing the translator
      • toBatchTranslator

        default Translator<I[],​O[]> toBatchTranslator()
        Returns a batch translator.
        Returns:
        a batch translator
      • toBatchTranslator

        default Translator<I[],​O[]> toBatchTranslator​(Batchifier batchifier)
        Returns a batch translator.
        Parameters:
        batchifier - the Batchifier to use
        Returns:
        a batch translator