Loading TOC...


   $data as xs:numeric*,
   $shape as xs:long*,
   $type as xs:string
) as ort:value


Constructs an ort:value to be supplied to an ort:session to perform inference. This function only creates ort:value with value type "TENSOR", and with a numeric element type. Use function ort:sequence to create ort:value with value type "SEQUENCE", and function ort:map to create ort:value with value type "MAP"; Use function ort:string to create tensor with element type "STRING".

$data A sequence of xs:nuemric representing the flattened one-dimensional view of the data.
$shape A sequence of xs:long representing the shape of the data.
$type An xs:string representing the tensor element type of the data. Possible values include: FLOAT, UINT8, INT8, UINT16, INT16, INT32, INT64, DOUBLE, UINT32, UINT64. Notice not all element types returned by ort:session-input-type and ort:session-output-type are supported.


  ort:value((1,2,3,4,5,6), (2,3), "float")
  an ort:value, described as OrtValue(Shape:[2, 3], Type: FLOAT)

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.