Loading TOC...

cntk.constant

cntk.constant(
   $shape as cntk.shape,
   $data-type as String,
   $init as Number,
   [$device as cntk.device],
   [$name as String]
) as cntk.constant

Summary

Constructs a constant from a scalar value.

Parameters
$shape The shape of the constant.
$data-type The data type of the constant.
$init The initial value of the constant,as a xs:double.
$device On which device to create the constant.
$name The name of the constant.

Example

  cntk.constant(cntk.shape([2,3]), "float", 55.55)
  => cntk.constant(Constant(Uid(Constant2), Shape([2 x 3]), Dynamic Axes([])))

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