From ecfa861c583a68543ffed05cb0437ce174b36fa9 Mon Sep 17 00:00:00 2001 From: Olivier BICHLER <olivier.bichler@cea.fr> Date: Tue, 27 Feb 2024 15:08:20 +0100 Subject: [PATCH] Fixed review comments --- include/aidge/graph/GraphView.hpp | 9 +++++++++ python_binding/operator/pybind_MetaOperatorDefs.cpp | 9 +-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/aidge/graph/GraphView.hpp b/include/aidge/graph/GraphView.hpp index a1eacf74a..0e55db15a 100644 --- a/include/aidge/graph/GraphView.hpp +++ b/include/aidge/graph/GraphView.hpp @@ -273,6 +273,15 @@ public: /** * Get the ranked list of nodes in the GraphView. + * Node ranking if performed the following: + * - The root node is put in the ranked list first (rank 1); + * - Then, its childs (in order of outputs) are added in the ranked list; + * - Then, its parents (in order of inputs) are added in the ranked list; + * - The childs and parents of the next node in the ranked list are then + * added to the list, and so on. + * - Any remaining nodes have no path to the root node and are added in + * arbitrary order. In this case, the ranking is not garanteed to be unique. + * * If the ranking cannot be garanteed to be unique, the second item indicates * the rank from which unicity cannot be garanteed. * @return std::pair<std::vector<NodePtr>, size_t> Pair with the list of ranked diff --git a/python_binding/operator/pybind_MetaOperatorDefs.cpp b/python_binding/operator/pybind_MetaOperatorDefs.cpp index 443baacf8..20a620cee 100644 --- a/python_binding/operator/pybind_MetaOperatorDefs.cpp +++ b/python_binding/operator/pybind_MetaOperatorDefs.cpp @@ -109,14 +109,7 @@ template <DimIdx_t DIM> void declare_PaddedMaxPoolingOp(py::module &m) { } void declare_LSTMOp(py::module &m) { - m.def("LSTM", [](DimSize_t in_channels, - DimSize_t hidden_channels, - DimSize_t seq_length, - bool nobias, - const std::string& name) - { - return LSTM(in_channels, hidden_channels, seq_length, nobias, name); - }, py::arg("in_channels"), + m.def("LSTM", &LSTM, py::arg("in_channels"), py::arg("hidden_channels"), py::arg("seq_length"), py::arg("nobias") = false, -- GitLab