AggregationLayer
AggregationLayer[f] represents a layer that aggregates an array of arbitrary rank into a vector, using the function f.
AggregationLayer[f, n] aggregates an array at level n.
AggregationLayer[f, n1;;n2] aggregates an array at levels n1 through n2.
AggregationLayer[f, {n1, n2, …}] aggregates an array at levels n1, n2, ….
Please visit the official Wolfram Language Reference for more details.