Loading TOC...

cntk:reduce-l2

cntk:reduce-l2(
   $x as cntk:variable,
   $axes as cntk:axis*,
   [$keep-dims as xs:boolean],
   [$name as xs:string]
) as cntk:function

Summary

Computes the L2 norm of the input tensor’s element along the provided axes. The resulted tensor has the same rank as the input if keepdims equal 1. If keepdims equal 0, then the resulted tensor have the reduced dimension pruned.

Parameters
$x The input tensor.
$axes Axis along which the reduction will be performed.
$keep-dims Keep the reduced dimension or not, default True mean keep reduced dimension.
$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:reduce-l2($input-variable1, (cntk:axis(0)), fn:false(), ")#Bqyt6")
  => cntk:function(Composite ReduceL2 (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.