Loading TOC...

cntk:value-to-array

cntk:value-to-array(
   $variable as cntk:variable,
   $value as cntk:value
) as json:array

Summary

Returns a json:array object representing the actual numeric values inside the cntk:value. The returned object is always an array of array. This is mostly used after evaluating a function to check the value of output.

Parameters
$variable The variable with which the value associates.
$value The value to decode.

Example

  let $variable := cntk:input-variable(cntk:shape((2,2)), "float", fn:false(),
    fn:false(), "feature")
  let $value := cntk:value(cntk:shape((2,2)), json:to-array(1 to 4), cntk:cpu(),
    "float")
  let $alias := cntk:value-alias($value, fn:false())
  return cntk:value-to-array($variable, $alias)
  => [[1, 2, 3, 4]]

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