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

Merge branch 'fix_reshape_op' into 'dev'

Resolve "Cannot get attribute of Reshape_Op in Python"

See merge request !81
parents 03ce8a78 f81d4b8b
No related branches found
No related tags found
No related merge requests found
......@@ -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)
;
}
......
......@@ -18,7 +18,7 @@ namespace py = pybind11;
namespace Aidge {
void init_Reshape(py::module& m) {
py::class_<Reshape_Op, std::shared_ptr<Reshape_Op>, OperatorTensor>(m, "ReshapeOp", py::multiple_inheritance())
py::class_<Reshape_Op, std::shared_ptr<Reshape_Op>, Attributes, OperatorTensor>(m, "ReshapeOp", py::multiple_inheritance())
.def("get_inputs_name", &Reshape_Op::getInputsName)
.def("get_outputs_name", &Reshape_Op::getOutputsName);
......
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