You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
axis (default: None): if specified, perform reduction along this axis only
Return value
Reduced value
Description
These functions compute aggregates (sum, mean, etc.) over all values of an input vector or tensor.
Available aggregations are:
ReduceSum(): the sum over the elements
ReduceLogSum(): the sum over elements in log representations (logC = log (exp (logA) + exp (logB)))
ReduceMean(): the mean over the elements
ReduceSum(): the maximum value of the elements
ReduceSum(): the minimum value
By default, aggregation is done over all elements.
In case of a tensor with rank>1, the optional axis parameter specifies a single axis
that the reduction is performed over.
For example, axis=2 applied to a [M x N]-dimensional matrix would aggregate over all columns,
yielding a [M x 1] result.
Reducing over sequences
If the input is a sequence, reduction is performed separately for every sequence item.
These operations do not support reduction over sequences.
Instead, you can achieve this with a recurrence.
For example, to sum up all elements of a sequence x, you can say:
sum = x + PastValue (0, sum, initialHiddenActivation=0)