MarkLogic 10 Product Documentation
ort.sessionInputTypeort.sessionInputType(
session as ort.session,
index as Number
) as object
Summary
Returns a Map
containing the type information of an input of
a session, specified by an index. The returned Map
is described in
the following table:
Key Name |
Value
Type |
Possible Values |
Details |
valueType |
String |
UNKNOWN, TENSOR, SEQUENCE, MAP,
OPAQUE, SPARSETENSOR |
valueType describes the type of value expected by
this input.
|
tensorType |
String |
UNDEFINED, FLOAT,
UINT8, INT8, UINT16, INT16, INT32, INT64, STRING, BOOL, FLOAT16, DOUBLE, UINT32,
UINT64, COMPLEX64, COMPLEX128, BFLOAT16 |
tensorType describes the
element type of the tensor. Only exists when valueType is TENSOR. |
shape |
Array |
An array of integer |
shape describes
the shape of the tensor. Negative value means unknown. Only exists when
valueType is TENSOR. |
Parameters |
session |
An ort.session .
|
index |
The index of the input. Starts from 0.
|
Example
const session = ort.session(cts.doc("testmodel.onnx"));
ort.sessionInputType(session, 0)
=>
{
"shape": [
1,
3,
224,
224
]
,
"tensorType": "FLOAT",
"valueType": "TENSOR"
}
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.