Loading TOC...

cntk.scalar

cntk.scalar(
   $data-type as String,
   $value as Number,
   [$device as cntk.device]
) as cntk.constant

Summary

Constructs a scalar, which is a zero dimensional constant.

Parameters
$data-type The data-type to use.
$value The value of the scalar.
$device On which device to create the scalar.

Example

  cntk.scalar("float", 55.55, cntk.cpu())
  => cntk.constant(Constant(Uid(Constant9), Shape([]), Dynamic Axes([])))

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