public class OnnxMap extends java.lang.Object implements OnnxValue
OrtSession.run(Map).
Supported types are those mentioned in "onnxruntime_c_api.h", keys: String and Long, values: String, Long, Float, Double.
| Modifier and Type | Class and Description |
|---|---|
static class |
OnnxMap.OnnxMapValueType
An enum representing the Java type of the values stored in an
OnnxMap. |
OnnxValue.OnnxValueType| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this map, releasing the native memory backing it and it's elements.
|
MapInfo |
getInfo()
Gets the type info object associated with this OnnxValue.
|
OnnxValue.OnnxValueType |
getType()
Gets the type of this OnnxValue.
|
java.util.Map<java.lang.Object,java.lang.Object> |
getValue()
Returns a weakly typed Map containing all the elements.
|
int |
size()
The number of entries in the map.
|
java.lang.String |
toString() |
public int size()
public OnnxValue.OnnxValueType getType()
OnnxValuepublic java.util.Map<java.lang.Object,java.lang.Object> getValue()
throws OrtException
getValue in interface OnnxValueOrtException - If the onnx runtime failed to read the entries.public MapInfo getInfo()
OnnxValuepublic java.lang.String toString()
toString in class java.lang.Object