Skip to content
Snippets Groups Projects
Commit fd5754e4 authored by Maxence Naud's avatar Maxence Naud Committed by Olivier BICHLER
Browse files

[fix] Remove automatic squeeze in GlobalAvgPool forwarddims

parent 0eaea479
No related branches found
No related tags found
2 merge requests!279v0.4.0,!239[Fix]/[Upd] GlobalAvgPooling::forwardDims() squeeze dimensions
...@@ -44,8 +44,10 @@ bool Aidge::GlobalAveragePooling_Op::forwardDims(bool /*allowDataDependency*/) { ...@@ -44,8 +44,10 @@ bool Aidge::GlobalAveragePooling_Op::forwardDims(bool /*allowDataDependency*/) {
// Global average pooling takes each filter, averages its values and uses // 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 // it as an output(Much like a fancier flatten). 1st dim is batch 2nd is
// number of filter // number of filter
mOutputs[0]->resize({getInput(0)->dims().at(0), std::vector<DimSize_t> outputDims(getInput(0)->nbDims(), 1);
getInput(0)->dims().at(1)}); outputDims[0] = getInput(0)->dims()[0];
outputDims[1] = getInput(0)->dims()[1];
mOutputs[0]->resize(outputDims);
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment