Loading TOC...

cntk:constant-set-value

cntk:constant-set-value(
   $constant as cntk:constant,
   $value as cntk:value
) as empty sequence

Summary

Sets the value of the constant using a cntk:value that is not a sequence or batch.

Parameters
$constant The constant whose value is to be set.
$value The value to set.

Example

  let $constant1 := cntk:constant-from-value(cntk:value(cntk:shape((2,3)), json:to-array(1 to 6)), "new_constant1")
  let $set_value1 := cntk:constant-set-value($constant1, cntk:value(cntk:shape((2,3)), json:to-array(2 to 7)))
  return cntk:constant-value($constant1)
  => cntk:value(Shape([]), Device Kind Name(CPU))

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