public class NoopTranslator extends java.lang.Object implements Translator<NDList,NDList>
Translator
implementation.Constructor and Description |
---|
NoopTranslator()
Constructs a
NoopTranslator . |
NoopTranslator(Batchifier batchifier)
Constructs a
NoopTranslator with the given Batchifier . |
Modifier and Type | Method and Description |
---|---|
Batchifier |
getBatchifier()
Gets the
Batchifier . |
NDList |
processInput(TranslatorContext ctx,
NDList input)
Processes the input and converts it to NDList.
|
NDList |
processOutput(TranslatorContext ctx,
NDList list)
Processes the output NDList to the corresponding output object.
|
void |
setBatchifier(Batchifier batchifier)
Sets the
Batchifier for the Translator. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
prepare
getPipeline
public NoopTranslator(Batchifier batchifier)
NoopTranslator
with the given Batchifier
.batchifier
- batchifier to usepublic NoopTranslator()
NoopTranslator
.
Uses the Batchifier.STACK
as default.
public NDList processInput(TranslatorContext ctx, NDList input)
processInput
in interface PreProcessor<NDList>
ctx
- the toolkit for creating the input NDArrayinput
- the input objectNDList
after pre-processingpublic NDList processOutput(TranslatorContext ctx, NDList list)
processOutput
in interface PostProcessor<NDList>
ctx
- the toolkit used for post-processinglist
- the output NDList after inferencepublic Batchifier getBatchifier()
Batchifier
.getBatchifier
in interface Translator<NDList,NDList>
Batchifier
public void setBatchifier(Batchifier batchifier)
Batchifier
for the Translator.batchifier
- the Batchifier
for the Translator