public interface TranslatorContext
extends java.lang.AutoCloseable
TranslatorContext interface provides a toolkit for pre-processing and postprocessing
functionality.
You can use this in Translator to get Model information and create an NDArray
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.lang.Object |
getAttachment(java.lang.String key)
Returns value of attached key-value pair to context.
|
Metrics |
getMetrics()
Returns the Metric tool to do benchmark.
|
Model |
getModel()
Returns the
Model object to understand the input/output. |
NDManager |
getNDManager()
|
void |
setAttachment(java.lang.String key,
java.lang.Object value)
Set a key-value pair of attachments.
|
Model getModel()
Model object to understand the input/output.Modeljava.lang.Object getAttachment(java.lang.String key)
key - key of attached valuevoid setAttachment(java.lang.String key,
java.lang.Object value)
key - key of attached valuevalue - value assosicated with keyvoid close()
close in interface java.lang.AutoCloseable