diff --git a/include/aidge/operator/MetaOperator.hpp b/include/aidge/operator/MetaOperator.hpp index ccff976cbb7cf8efc59223dfd658ca2a4d03a80b..69c69ae179d601c73c4c5dbf169b6b22ec7107b1 100644 --- a/include/aidge/operator/MetaOperator.hpp +++ b/include/aidge/operator/MetaOperator.hpp @@ -28,7 +28,7 @@ namespace Aidge { class MetaOperator_Op : public OperatorTensor, - public Registrable<MetaOperator_Op, std::array<std::string, 2>, std::function<std::unique_ptr<OperatorImpl>(const MetaOperator_Op &)>> { + public Registrable<MetaOperator_Op, std::array<std::string, 2>, std::function<std::shared_ptr<OperatorImpl>(const MetaOperator_Op &)>> { public: // outputs shared with micro-graph output Tensors // Micro-graph handling: diff --git a/python_binding/operator/pybind_MetaOperatorDefs.cpp b/python_binding/operator/pybind_MetaOperatorDefs.cpp index d021a79c5ff4e337bebf424465458ddabf056a56..524da7a7ece4bd9959ab5080f2cf8fc42cf09996 100644 --- a/python_binding/operator/pybind_MetaOperatorDefs.cpp +++ b/python_binding/operator/pybind_MetaOperatorDefs.cpp @@ -194,12 +194,14 @@ void init_MetaOperatorDefs(py::module &m) { // declare_PaddedMaxPoolingOp<3>(m); declare_LSTMOp(m); - py::class_<MetaOperator_Op, std::shared_ptr<MetaOperator_Op>, OperatorTensor>(m, "MetaOperator_Op", py::multiple_inheritance()) + py::class_<MetaOperator_Op, std::shared_ptr<MetaOperator_Op>, OperatorTensor>(m, "MetaOperatorOp", py::multiple_inheritance()) .def(py::init<const char *, const std::shared_ptr<GraphView>&>(), py::arg("type"), py::arg("graph")) .def("get_micro_graph", &MetaOperator_Op::getMicroGraph); + declare_registrable<MetaOperator_Op>(m, "MetaOperatorOp"); + m.def("meta_operator", &MetaOperator, py::arg("type"), py::arg("graph"),