Skip to content
Snippets Groups Projects
Commit f6cc64eb authored by Maxence Naud's avatar Maxence Naud
Browse files

Adapt recipies to Conv and ConvDepthWise changes

parent dce1e8e5
No related branches found
No related tags found
2 merge requests!152Update Aidge export to take a graph view has an argument instead of a...,!129Remove import warnings
......@@ -58,14 +58,14 @@ void Aidge::fuseBatchNorm(std::shared_ptr<Aidge::Node> convNode,
if (convNode->type() == Conv_Op<2>::Type) {
const std::shared_ptr<Conv_Op<2>> convOpPtr =
std::static_pointer_cast<Conv_Op<2>>(convNode->getOperator());
convNbOutChannels = convOpPtr->getAttr<DimSize_t>("OutChannels");
channelsSize = convOpPtr->getAttr<DimSize_t>("InChannels");
convNbOutChannels = convOpPtr->outChannels();
channelsSize = convOpPtr->inChannels();
kernelDims = convOpPtr->getAttr<std::array<DimSize_t, 2>>("KernelDims");
}
else if (convNode->type() == ConvDepthWise_Op<2>::Type) {
const std::shared_ptr<ConvDepthWise_Op<2>> convOpPtr =
std::static_pointer_cast<ConvDepthWise_Op<2>>(convNode->getOperator());
convNbOutChannels = convOpPtr->getAttr<DimSize_t>("Channels");
convNbOutChannels = convOpPtr->nbChannels();
kernelDims = convOpPtr->getAttr<std::array<DimSize_t, 2>>("KernelDims");
}
......
......@@ -90,7 +90,7 @@ void Aidge::fuseMulAdd(std::shared_ptr<Aidge::Node> matmulNode, std::shared_ptr<
fcName += "_" + addNode->name();
}
std::shared_ptr<Node> fc = std::make_shared<Node>(std::make_shared<FC_Op>(outSize, bias ? false : true), fcName);
std::shared_ptr<Node> fc = std::make_shared<Node>(std::make_shared<FC_Op>(bias ? false : true), fcName);
// Step 2 : Branch existing producers & create the others
// link weights & bias
......
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