public class StyleTransferTranslator extends java.lang.Object implements NoBatchifyTranslator<Image,Image>
Translator
that provides preprocessing and postprocessing for StyleTransfer.Constructor and Description |
---|
StyleTransferTranslator() |
Modifier and Type | Method and Description |
---|---|
NDList |
processInput(TranslatorContext ctx,
Image input)
Processes the input and converts it to NDList.
|
Image |
processOutput(TranslatorContext ctx,
NDList list)
Processes the output NDList to the corresponding output object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBatchifier
prepare
public NDList processInput(TranslatorContext ctx, Image input)
processInput
in interface PreProcessor<Image>
ctx
- the toolkit for creating the input NDArrayinput
- the input objectNDList
after pre-processingpublic Image processOutput(TranslatorContext ctx, NDList list)
processOutput
in interface PostProcessor<Image>
ctx
- the toolkit used for post-processinglist
- the output NDList after inference