Loading TOC...

cntk:value-device

cntk:value-device(
   $value as cntk:value
) as cntk:device

Summary

Returns the descriptor of the device that this value resides on

Parameters
$value The value used to get the device.

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 $new_value := cntk:value-deep-clone($value, fn:false())
  return xdmp:quote(cntk:value-device($new_value))
  => cntk:device(Device Kind Name(CPU))

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