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
No related merge requests found
...@@ -58,14 +58,14 @@ void Aidge::fuseBatchNorm(std::shared_ptr<Aidge::Node> convNode, ...@@ -58,14 +58,14 @@ void Aidge::fuseBatchNorm(std::shared_ptr<Aidge::Node> convNode,
if (convNode->type() == Conv_Op<2>::Type) { if (convNode->type() == Conv_Op<2>::Type) {
const std::shared_ptr<Conv_Op<2>> convOpPtr = const std::shared_ptr<Conv_Op<2>> convOpPtr =
std::static_pointer_cast<Conv_Op<2>>(convNode->getOperator()); std::static_pointer_cast<Conv_Op<2>>(convNode->getOperator());
convNbOutChannels = convOpPtr->getAttr<DimSize_t>("OutChannels"); convNbOutChannels = convOpPtr->outChannels();
channelsSize = convOpPtr->getAttr<DimSize_t>("InChannels"); channelsSize = convOpPtr->inChannels();
kernelDims = convOpPtr->getAttr<std::array<DimSize_t, 2>>("KernelDims"); kernelDims = convOpPtr->getAttr<std::array<DimSize_t, 2>>("KernelDims");
} }
else if (convNode->type() == ConvDepthWise_Op<2>::Type) { else if (convNode->type() == ConvDepthWise_Op<2>::Type) {
const std::shared_ptr<ConvDepthWise_Op<2>> convOpPtr = const std::shared_ptr<ConvDepthWise_Op<2>> convOpPtr =
std::static_pointer_cast<ConvDepthWise_Op<2>>(convNode->getOperator()); 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"); 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< ...@@ -90,7 +90,7 @@ void Aidge::fuseMulAdd(std::shared_ptr<Aidge::Node> matmulNode, std::shared_ptr<
fcName += "_" + addNode->name(); 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 // Step 2 : Branch existing producers & create the others
// link weights & bias // 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