Skip to content
Snippets Groups Projects
Commit 5641b99e authored by Maxence Naud's avatar Maxence Naud
Browse files

Move computeOutputDims() function from GenericOp to OpTensor python binding so...

Move computeOutputDims() function from GenericOp to OpTensor python binding so that more Operators can use it
parent e428f123
No related branches found
No related tags found
2 merge requests!105version 0.2.0,!81Resolve "Cannot get attribute of Reshape_Op in Python"
Pipeline #40019 canceled
......@@ -24,7 +24,6 @@ void init_GenericOperator(py::module& m) {
py::class_<GenericOperator_Op, std::shared_ptr<GenericOperator_Op>, DynamicAttributes, OperatorTensor>(m, "GenericOperatorOp",
py::multiple_inheritance())
.def_readonly_static("identity", &GenericOperator_Op::Identity)
.def("compute_output_dims", &GenericOperator_Op::computeOutputDims)
.def("set_compute_output_dims", &GenericOperator_Op::setComputeOutputDims, py::arg("computation_function"));
// &GenericOperator
......
......@@ -24,6 +24,7 @@ void init_OperatorTensor(py::module& m){
.def("set_output", (void (OperatorTensor::*)(const IOIndex_t, const std::shared_ptr<Data>&)) &OperatorTensor::setOutput, py::arg("outputIdx"), py::arg("data"))
.def("set_input", (void (OperatorTensor::*)(const IOIndex_t, const std::shared_ptr<Data>&)) &OperatorTensor::setInput, py::arg("outputIdx"), py::arg("data"))
.def("compute_output_dims", &OperatorTensor::computeOutputDims)
.def("output_dims_forwarded", &OperatorTensor::outputDimsForwarded)
;
}
......
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