Loading TOC...

cntk:squared-error

cntk:squared-error(
   $output as cntk:variable,
   $targets as cntk:variable,
   [$name as xs:string]
) as cntk:function

Summary

This operation computes the sum of the squared difference between elements in the two input matrices. The result is a scalar (i.e., one by one matrix). This is often used as a training criterion.

Parameters
$output The output values from the network.
$targets It is usually a one-hot vector where the hot bit corresponds to the label index.
$name The name of the function instance in the network.

Example

  let $input-variable1 := cntk:input-variable(cntk:shape((3)), "float", fn:false(),
    fn:false(), "feature")
  let $input-variable2 := cntk:input-variable(cntk:shape((3)), "float", fn:false(),
    fn:false(), "feature")
  return cntk:squared-error($input-variable2, $input-variable2, "xz[t^+^sK*")
  => cntk:function(Composite SquaredError (Input(Name(feature), Shape([3]),
  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.