Loading TOC...


   $operand as cntk:variable,
   $axis as cntk:axis*,
   [$keep-dims as xs:boolean],
   [$name as xs:string]
) as cntk:function


Computes the sum of the input tensor’s elements across one axis or a list of axes. If the axis parameter is not specified then the sum will be computed over all static axes, which is equivalent with specifying axis=Axis.all_static_axes(). If axis=Axis.all_axes() is specified, then the output is a scalar which is the sum of all the elements in the minibatch. And if axis=Axis.default_batch_axis() is specified, then the reduction will happen across the batch axis (In this case the input must not be a sequence).

$operand The operand of the operation.
$axis Axis along which the reduction will be performed.
$keep-dims Whether to keep dimensions.
$name The name of the function instance in the network.


  let $input-variable1 := cntk:input-variable(cntk:shape((3)), "float", fn:false(),
    fn:false(), "feature")
  return cntk:reduce-sum-on-axes($input-variable1, (cntk:axis(0)), fn:true())
  => cntk:function(Composite ReduceElements (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.