Loading TOC...


   $operand as cntk.variable,
   $axis as cntk.axis,
   [$name as 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.
$name The name of the function instance in the network.


  var inputVariable1 = cntk.inputVariable(cntk.shape([3]), "float", fn.false(),
    fn.false(), "feature")
  cntk.reduceSum(inputVariable1, cntk.axis(0), "x,")
  => 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.