Loading TOC...

cntk:value

cntk:value(
   $shape as cntk:shape,
   $data as json:array,
   [$device as cntk:device],
   [$data-type as xs:string],
   [$read-only as xs:boolean]
) as cntk:value

Summary

Constructs a cntk:value.

Parameters
$shape The shape of the underlining tensor.
$data A one dimensional sequence of numbers representing the flattened view of the tensor. The length must equal the size represented by $shape, otherwise an exception is thrown.
$device The device on which the value resides.
$data-type The data type of this value. Can be "float" or "double". Default is "float".
$read-only Whether the value is read only. Right now, only false is supported.

Example

  cntk:value(cntk:shape((1)), json:to-array(3))
  => cntk:value(Shape([1]), Device Kind Name(GPU))

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