From 50a8f938cf2dad9b7ea79576aec2e0c83c769549 Mon Sep 17 00:00:00 2001
From: NAUD Maxence <maxence.naud@cea.fr>
Date: Thu, 12 Oct 2023 12:46:39 +0000
Subject: [PATCH] [Fix] do not use initializer_list to initialize array anymore
 in operators factories

---
 include/aidge/operator/Conv.hpp   | 2 +-
 include/aidge/operator/FC.hpp     | 4 ++--
 include/aidge/operator/MatMul.hpp | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/aidge/operator/Conv.hpp b/include/aidge/operator/Conv.hpp
index 22553080c..d126bdbe1 100644
--- a/include/aidge/operator/Conv.hpp
+++ b/include/aidge/operator/Conv.hpp
@@ -196,7 +196,7 @@ inline std::shared_ptr<Node> Conv(DimSize_t in_channels,
     auto conv = std::make_shared<Node>(std::make_shared<Conv_Op<static_cast<DimIdx_t>(DIM)>>(in_channels, out_channels, kernel_dims, stride_dims, padding_dims, dilation_dims), name);
     // addProducer(conv, 1, append(append(kernel_dims, in_channels), out_channels), "w");
     addProducer(conv, 1, append(out_channels, append(in_channels, kernel_dims)), "w");
-    addProducer(conv, 2, {out_channels}, "b");
+    addProducer(conv, 2, std::array<DimSize_t, 1>({out_channels}), "b");
     return conv;
 }
 
diff --git a/include/aidge/operator/FC.hpp b/include/aidge/operator/FC.hpp
index 127d39a8b..c9444bd35 100644
--- a/include/aidge/operator/FC.hpp
+++ b/include/aidge/operator/FC.hpp
@@ -163,8 +163,8 @@ public:
 inline std::shared_ptr<Node> FC(DimSize_t out_channels, bool noBias = false, const std::string& name = "") {
     // FIXME: properly handle default w&b initialization in every cases
     auto fc = std::make_shared<Node>(std::make_shared<FC_Op>(out_channels, noBias), name);
-    addProducer(fc, 1, {out_channels, 1}, "w");
-    addProducer(fc, 2, {(noBias ? 0 : out_channels)}, "b"); // already sets bias dims
+    addProducer(fc, 1, std::array<DimSize_t, 2>({out_channels, 1}), "w");
+    addProducer(fc, 2, (noBias ? std::array<DimSize_t, 1>({0}) : std::array<DimSize_t, 1>({out_channels})), "b"); // already sets bias dims
     return fc;
 }
 } // namespace Aidge
diff --git a/include/aidge/operator/MatMul.hpp b/include/aidge/operator/MatMul.hpp
index d0dadd847..d8c62117e 100644
--- a/include/aidge/operator/MatMul.hpp
+++ b/include/aidge/operator/MatMul.hpp
@@ -153,7 +153,7 @@ public:
 inline std::shared_ptr<Node> MatMul(DimSize_t out_channels, const std::string& name = "") {
     // FIXME: properly handle default w initialization in every cases
     auto matmul = std::make_shared<Node>(std::make_shared<MatMul_Op>(out_channels), name);
-    addProducer(matmul, 1, {out_channels, 1}, "w");
+    addProducer(matmul, 1, std::array<DimSize_t, 2>({out_channels, 1}), "w");
     return matmul;
 }
 } // namespace Aidge
-- 
GitLab