ort.map( key as ort.value, value as ort.value ) as ort.value
Creates a value with type "MAP", using an ort.value
as key and an
ort.value
as value. Key and Value can be one dimensional tensor of
the same length. Supported tensor element types are:
key element type | value element type |
---|---|
STRING | STRING |
STRING | INT64 |
STRING | FLOAT |
STRING | DOUBLE |
INT64 | STRING |
INT64 | INT64 |
INT64 | FLOAT |
INT64 | DOUBLE |
ort.map(ort.string(["key1", "key2"],[2]),ort.value([1,2],[2],"float")) => OrtMap([Key: OrtValue(Shape:[2], Type: STRING), Value: OrtValue(Shape:[2], Type: FLOAT)])
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.