From f6f1c60c98cd7630ceba03aa6fc43ae7533e8330 Mon Sep 17 00:00:00 2001 From: NAUD Maxence <maxence.naud@cea.fr> Date: Fri, 4 Aug 2023 13:35:46 +0000 Subject: [PATCH] [Doc] pybind_GraphView --- python_binding/graph/pybind_GraphView.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/python_binding/graph/pybind_GraphView.cpp b/python_binding/graph/pybind_GraphView.cpp index 8078a5292..555540045 100644 --- a/python_binding/graph/pybind_GraphView.cpp +++ b/python_binding/graph/pybind_GraphView.cpp @@ -63,10 +63,26 @@ void init_GraphView(py::module& m) { IOIndex_t)) & GraphView::addChild, py::arg("toOtherNode"), py::arg("fromOutNode") = nullptr, - py::arg("fromTensor") = 0U, py::arg("toTensor") = gk_IODefaultIndex) + py::arg("fromTensor") = 0U, py::arg("toTensor") = gk_IODefaultIndex, + R"mydelimiter( + Include a Node to the current GraphView object. + + :param other_node: Node to add + :type oth_Node: Node + :param includeLearnableParameter: include non-data inputs, like weights and biases. Default True. + :type includeLearnableParameter + )mydelimiter") + .def("replace_with", &GraphView::replaceWith, py::arg("new_nodes"), + R"mydelimiter( + Replace the current GraphView with the set of given Nodes if possible. - .def("replace_with", &GraphView::replaceWith, py::arg("new_nodes")) + :param new_nodes: Nodes with connections already taken care of. + :type new_nodes: Node + :return: Whether any replacement has been made. + :rtype: bool + )mydelimiter") + .def("get_nodes", &GraphView::getNodes) .def("get_node", &GraphView::getNode, py::arg("node_name")) .def("forward_dims", &GraphView::forwardDims) @@ -87,4 +103,4 @@ void init_GraphView(py::module& m) { // }) ; } -} // namespace Aidge +} // namespace Aidge \ No newline at end of file -- GitLab