diff --git a/src/recipes/FuseBatchNorm.cpp b/src/recipes/FuseBatchNorm.cpp index 76c15a0627ee65ed23c2dc385d9cd3787f9f0979..21009318cddae7ce60a01592b19ab237a77fbd2b 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 6c849c54a916af10d4d926e7e0d0c339e757e01b..bb4b0e3db1974ccf106699b25fd71fc9cc09654c 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