Loading TOC...


   $model as cntk.function,
   $input-variable-value-map as Array,
   $output-variables as cntk.variable[],
   [$device as cntk.device]
) as Sequence


Evaluate a CNTK model/function using specified input values. Returns a sequence of cntk:value, in the same order as the sequence of output variables.

$model A CNTK model/function. It can be defined in place, or loaded from a binary node in the database.
$input-variable-value-map The input variable value map as a json:array. This must be an array of array, where each inner array must have length 2 (essentially a pair), with the first element being the variable, and second element being the corresponding value.
$output-variables The output variables of the model. The output values will be in the same order as the output variables. This parameter is usually obtained by calling cntk:function-outputs($model)
$device The device on which the computation is performed. If not provided, the default device will be used.

Required Privileges



  var inputVariable1 = cntk.inputVariable(cntk.shape([3]), "float", fn.false(), fn.false(), "feature")
  var inputVariable2 = cntk.inputVariable(cntk.shape([3]), "float", fn.false(), fn.false(), "feature")
  var model = cntk.argmin(inputVariable2, cntk.axis(0), "@<H54c")
  var inputValues = (
    cntk.batch(cntk.shape([3]), [1,2,3,4,5,6], cntk.cpu(), "float"),
    cntk.batch(cntk.shape([3]), [2,3,4,5,6,7], cntk.cpu(), "float"))
  var pair1 = [inputVariable1, inputValues[1]]
  var pair2 = [inputVariable2, inputValues[2]]
  var inputPairs = [pair1, pair2]
  var outputVariable = cntk.functionOutput(model)
  cntk.evaluate(model, inputPairs, outputVariable, cntk.cpu())
  => cntk.value(Shape([1 x 1 x 2]), Device Kind Name(CPU))

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