Skip to content
Snippets Groups Projects
Commit e1e72618 authored by Thibault Allenet's avatar Thibault Allenet
Browse files

NodeRegex & Recipies python API doc

parent 859227aa
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,16 @@
namespace py = pybind11;
namespace Aidge {
void init_NodeRegex(py::module& m){
py::class_<NodeRegex, std::shared_ptr<NodeRegex>>(m, "NodeRegex")
.def(py::init<const std::string>(), py::arg("condition"))
py::class_<NodeRegex, std::shared_ptr<NodeRegex>>(m, "NodeRegex", "NodeRegex class describes a condition to test on any operator. Current version only tests the type of the operator.")
.def(py::init<const std::string>(), py::arg("condition"), R"mydelimiter(
Constructor of NodeRegex
Parameters
----------
:param condition: Condition to be fulfilled by an operator. Currently supported conditions are only the operator types.
:type condition: `string`
)mydelimiter")
;
}
}
......@@ -20,8 +20,24 @@ namespace py = pybind11;
namespace Aidge {
void init_Recipies(py::module &m) {
m.def("fuse_mul_add", &fuseMulAdd, py::arg("nodes"));
m.def("remove_flatten", &removeFlatten, py::arg("nodes"));
m.def("fuse_mul_add", &fuseMulAdd, py::arg("nodes"), R"mydelimiter(
Recipie to Fuse MatMul and Add operators into an `aidge.FC` operator.
Parameters
----------
:param nodes: The MatMul and Add nodes to fuse.
:type nodes: list of `aidge.node`
)mydelimiter");
m.def("remove_flatten", &removeFlatten, py::arg("nodes"), R"mydelimiter(
Recipie to remove a flatten operator.
Parameters
----------
:param nodes: The flatten operator to remove.
:type condition: list of `aidge.node`
)mydelimiter");
}
} // namespace Aidge
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment