Reduce

ReduceMean

layer eddl::ReduceMean(layer l, vector<int> axis, bool keepdims = false)

Computes the mean of the elements over the given axis.

Parameters
  • l – Parent layer

  • axis – Axis where to perform the reduction

  • keepdims – Boolean flag to indicate if original dimensions must be preserved

Returns

A ReduceMean Layer.

Example:

l = ReduceMean(l, {1}, true);

ReduceVar

layer eddl::ReduceVar(layer l, vector<int> axis, bool keepdims = false)

Computes the variance of the elements over the given axis.

Parameters
  • l – Parent layer

  • axis – Axis where to perform the reduction

  • keepdims – Boolean flag to indicate if original dimensions must be preserved

Returns

A ReduceVar Layer.

Example:

l = ReduceVar(l, {1}, true);

ReduceSum

layer eddl::ReduceSum(layer l, vector<int> axis, bool keepdims = false)

Computes the sum of the elements over the given axis.

Parameters
  • l – Parent layer

  • axis – Axis where to perform the reduction

  • keepdims – Boolean flag to indicate if original dimensions must be preserved

Returns

A ReduceSum Layer.

Example:

l = ReduceSum(l, {1}, true);

ReduceMax

layer eddl::ReduceMax(layer l, vector<int> axis, bool keepdims = false)

Computes the maximum of the elements over the given axis.

Parameters
  • l – Parent layer

  • axis – Axis where to perform the reduction

  • keepdims – Boolean flag to indicate if original dimensions must be preserved

Returns

A ReduceMax Layer.

Example:

l = ReduceMax(l, {1}, true);

ReduceMin

layer eddl::ReduceMin(layer l, vector<int> axis, bool keepdims = false)

Computes the minimum of the elements over the given axis.

Parameters
  • l – Parent layer

  • axis – Axis where to perform the reduction

  • keepdims – Boolean flag to indicate if original dimensions must be preserved

Returns

A ReduceMin Layer.

Example:

l = ReduceMin(l, {1}, true);