Skip to content
Snippets Groups Projects
Commit eaa8ff98 authored by Houssem ROUIS's avatar Houssem ROUIS
Browse files

support 2D bias in FC

parent a50fa266
No related branches found
No related tags found
1 merge request!350Draft: Fix import tests
......@@ -62,8 +62,13 @@ bool Aidge::FC_Op::forwardDims(bool /*allowDataDependency*/) {
}
// check optional bias
if(getInput(2))
AIDGE_ASSERT((getInput(2)->nbDims() == 1) &&
(getInput(2)->template dims<1>()[0] == outChannels),
AIDGE_ASSERT((((getInput(2)->nbDims() == 1) &&
(getInput(2)->template dims<1>()[0] == outChannels)) ||
((getInput(2)->nbDims() == 2)&&
(getInput(0)->nbDims() == 2)&&
(getInput(2)->template dims<2>()[0] == getInput(0)->template dims<2>()[0])&&
(getInput(2)->template dims<2>()[1] == outChannels)
)),
"Wrong bias size for FC operator.");
// <batch, OutChannels>
mOutputs[0]->resize({getInput(0)->dims()[0], outChannels});
......
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