Skip to content
Snippets Groups Projects
Commit 2e5ace67 authored by Maxence Naud's avatar Maxence Naud Committed by Maxence Naud
Browse files

Add python binding for 'Operator::clone' enabling deep copy of operators in Python

parent 77d70664
No related branches found
No related tags found
2 merge requests!279v0.4.0,!273[Fix] Producer clone and Tensor copy
......@@ -37,6 +37,7 @@ void init_Operator(py::module& m){
py::class_<Operator, std::shared_ptr<Operator>>(m, "Operator")
.def("__repr__", &Operator::repr)
.def("backend", &Operator::backend)
.def("clone", &Operator::clone)
.def("set_output", py::overload_cast<const IOIndex_t, const std::shared_ptr<Data>&>(&Operator::setOutput, py::const_), py::arg("outputIdx"), py::arg("data"))
.def("set_input", py::overload_cast<const IOIndex_t, const std::shared_ptr<Data>&>(&Operator::setInput), py::arg("inputIdx"), py::arg("data"))
.def("get_raw_output", &Operator::getRawOutput, py::arg("outputIdx"))
......
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