Loading TOC...

cntk.valueToArray

cntk.valueToArray(
   $variable as cntk.variable,
   $value as cntk.value
) as 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

  var variable = cntk.inputVariable(cntk.shape([2,2]), "float", fn.false(),
    fn.false(), "feature")
  var value = cntk.value(cntk.shape([2,2]), [1,2,3,4], cntk.cpu(),
    "float")
  var alias = cntk.valueAlias(value, fn.false())
  cntk.valueToArray(variable, alias)
  => [[1, 2]]

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