From 222ee14fe495fb210c046c0e7f19ed91833c0b48 Mon Sep 17 00:00:00 2001 From: Jerome Hue <jerome.hue@cea.fr> Date: Mon, 9 Dec 2024 18:43:04 +0100 Subject: [PATCH] chore: reorder parameters of Leaky constructor --- include/aidge/operator/MetaOperatorDefs.hpp | 2 +- python_binding/operator/pybind_MetaOperatorDefs.cpp | 2 +- src/operator/MetaOperatorDefs/Leaky.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/aidge/operator/MetaOperatorDefs.hpp b/include/aidge/operator/MetaOperatorDefs.hpp index f80dd38f1..c9de36b1f 100644 --- a/include/aidge/operator/MetaOperatorDefs.hpp +++ b/include/aidge/operator/MetaOperatorDefs.hpp @@ -213,8 +213,8 @@ std::shared_ptr<MetaOperator_Op> LSTM_Op(DimSize_t seq_length); std::shared_ptr<MetaOperator_Op> LeakyOp(); std::shared_ptr<Node> Leaky(const int nbTimeSteps, - const float threshold, const float beta, + const float threshold = 1.0, const std::string &name = ""); } // namespace Aidge diff --git a/python_binding/operator/pybind_MetaOperatorDefs.cpp b/python_binding/operator/pybind_MetaOperatorDefs.cpp index 90edfe791..b2811fbaa 100644 --- a/python_binding/operator/pybind_MetaOperatorDefs.cpp +++ b/python_binding/operator/pybind_MetaOperatorDefs.cpp @@ -182,8 +182,8 @@ void declare_LSTMOp(py::module &m) { void declare_LeakyOp(py::module &m) { m.def("Leaky", &Leaky, py::arg("nb_timesteps"), - py::arg("threshold"), py::arg("beta"), + py::arg("threshold") = 1.0, py::arg("name") = ""); } diff --git a/src/operator/MetaOperatorDefs/Leaky.cpp b/src/operator/MetaOperatorDefs/Leaky.cpp index 17296d130..5513323fd 100644 --- a/src/operator/MetaOperatorDefs/Leaky.cpp +++ b/src/operator/MetaOperatorDefs/Leaky.cpp @@ -14,8 +14,8 @@ constexpr auto memorizeOpDataOutputRecIndex = 1; constexpr auto memorizeOpDataOutputIndex = 0; std::shared_ptr<Node> Leaky(const int nbTimeSteps, - const float threshold, const float beta, + const float threshold, const std::string &name) { Log::warn("! Lots of parameters are hardcoded"); -- GitLab