Loading TOC...

cntk.inputVariable

cntk.inputVariable(
   $shape as cntk.shape,
   $data-type as String,
   [$is-sparse as Boolean],
   [$needs-gradient as Boolean],
   [$name as String],
   [$dynamic-axes as cntk.axis[]]
) as cntk.variable

Summary

Constructs an input variable.

Parameters
$shape The shape of the input variable.
$data-type The data-type of the input variable.
$is-sparse Whether the input variable is sparse. Only accepted value is false. If passed a true, an exception is thrown. This is reserved for future implementation.
$needs-gradient Whether the input variable needs gradient. Default is false.
$name The name of the input variable.
$dynamic-axes The dynamic axes of the input variable. Default is the default-batch-axis as batch axis and the default-dynamic-axis as sequence axis.

Example

  cntk.inputVariable(cntk.shape([3,4]), "float",fn.false(),
    fn.false(), "feature")
  => cntk.variable(Input(Name(feature), Shape([3 x 4]), Dynamic Axes([Sequence
  Axis(Default Dynamic Axis), Batch Axis(Default Batch Axis)])))

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