From e89f537cd75036211b8f425ebae30f9e7c961059 Mon Sep 17 00:00:00 2001
From: NAUD Maxence <maxence.naud@cea.fr>
Date: Mon, 3 Jun 2024 08:37:23 +0000
Subject: [PATCH] Adapt recipies to Conv and ConvDepthWise changes

---
 src/recipes/FuseBatchNorm.cpp | 6 +++---
 src/recipes/FuseMulAdd.cpp    | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/recipes/FuseBatchNorm.cpp b/src/recipes/FuseBatchNorm.cpp
index 76c15a062..21009318c 100644
--- a/src/recipes/FuseBatchNorm.cpp
+++ b/src/recipes/FuseBatchNorm.cpp
@@ -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");
     }
 
diff --git a/src/recipes/FuseMulAdd.cpp b/src/recipes/FuseMulAdd.cpp
index 6c849c54a..bb4b0e3db 100644
--- a/src/recipes/FuseMulAdd.cpp
+++ b/src/recipes/FuseMulAdd.cpp
@@ -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
-- 
GitLab