diff --git a/src/recipes/MatMulToFC.cpp b/src/recipes/MatMulToFC.cpp index af775ced740e69e34ec8b728b8482226a98fb155..87cb48682d473822ee651260ad5a8a4f74a4b6f2 100644 --- a/src/recipes/MatMulToFC.cpp +++ b/src/recipes/MatMulToFC.cpp @@ -28,7 +28,9 @@ void Aidge::matMulToFC(std::shared_ptr<Aidge::Node> matmulNode, std::shared_ptr<Aidge::Node> addNode) { // Fuse Mulmat & Add into FC // Inputs : old nodes (pointers on mul & add) - AIDGE_ASSERT((matmulNode->type() == "MatMul" && (addNode == nullptr || addNode->type() == "Add")), "Wrong type for the nodes to replace"); + AIDGE_ASSERT((matmulNode->type() == "MatMul" && (addNode == nullptr || addNode->type() == "Add")), + "Wrong type for the nodes to replace: {} and {}", + matmulNode->type(), (addNode) ? addNode->type() : "nullptr"); // Step 1 : Create FC @@ -103,6 +105,6 @@ void Aidge::matMulToFC(std::shared_ptr<Aidge::GraphView> graphView){ for (const auto& match : matches) { const auto it = match.anchors.find("Add"); - matMulToFC(match.startNode, (it != match.anchors.end()) ? it->second.at("#") : nullptr); + matMulToFC(match.graph->rootNode(), (it != match.anchors.end()) ? it->second.at("#") : nullptr); } }