diff --git a/src/operator/GlobalAveragePooling.cpp b/src/operator/GlobalAveragePooling.cpp
index bbcfd0d28ca039318647d206af876727793e1bfc..57886ec2faec86bc5d3a515ed685fdcfd0e15e4e 100644
--- a/src/operator/GlobalAveragePooling.cpp
+++ b/src/operator/GlobalAveragePooling.cpp
@@ -44,8 +44,10 @@ bool Aidge::GlobalAveragePooling_Op::forwardDims(bool /*allowDataDependency*/) {
         // Global average pooling takes each filter, averages its values and uses
         // it as an output(Much like a fancier flatten). 1st dim is batch 2nd is
         // number of filter
-        mOutputs[0]->resize({getInput(0)->dims().at(0),
-                             getInput(0)->dims().at(1)});
+        std::vector<DimSize_t> outputDims(getInput(0)->nbDims(), 1);
+        outputDims[0] = getInput(0)->dims()[0];
+        outputDims[1] = getInput(0)->dims()[1];
+        mOutputs[0]->resize(outputDims);
         return true;
     }