diff --git a/python_binding/operator/pybind_Add.cpp b/python_binding/operator/pybind_Add.cpp index c3eeb192a88163be96f973a55e6ef7cc60ec48af..1f588352d46e19cb5f40fc98d5f94ebd1f392dcc 100644 --- a/python_binding/operator/pybind_Add.cpp +++ b/python_binding/operator/pybind_Add.cpp @@ -22,8 +22,8 @@ namespace Aidge { void declare_Add(py::module &m) { py::class_<Add_Op, std::shared_ptr<Add_Op>, OperatorTensor>(m, "AddOp", py::multiple_inheritance()) - .def("get_inputs_name", &Add_Op::getInputsName) - .def("get_outputs_name", &Add_Op::getOutputsName); + .def_static("get_inputs_name", &Add_Op::getInputsName) + .def_static("get_outputs_name", &Add_Op::getOutputsName); declare_registrable<Add_Op>(m, "AddOp"); m.def("Add", &Add, py::arg("nbIn"), py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_BatchNorm.cpp b/python_binding/operator/pybind_BatchNorm.cpp index 9640141e03bcd811f5ce24c544c5cdbc9fe6b2f3..a12df1c8656003aef6c643b1060f21cc44111197 100644 --- a/python_binding/operator/pybind_BatchNorm.cpp +++ b/python_binding/operator/pybind_BatchNorm.cpp @@ -27,9 +27,9 @@ void declare_BatchNormOp(py::module& m) { .def(py::init<float, float>(), py::arg("epsilon"), py::arg("momentum")) - .def("get_inputs_name", &BatchNorm_Op<DIM>::getInputsName) - .def("get_outputs_name", &BatchNorm_Op<DIM>::getOutputsName) - .def("attributes_name", &BatchNorm_Op<DIM>::staticGetAttrsName); + .def_static("get_inputs_name", &BatchNorm_Op<DIM>::getInputsName) + .def_static("get_outputs_name", &BatchNorm_Op<DIM>::getOutputsName) + .def_static("attributes_name", &BatchNorm_Op<DIM>::staticGetAttrsName); declare_registrable<BatchNorm_Op<DIM>>(m, pyClassName); m.def(("BatchNorm" + std::to_string(DIM) + "D").c_str(), &BatchNorm<DIM>, py::arg("nbFeatures"), py::arg("epsilon") = 1.0e-5F, py::arg("momentum") = 0.1F, py::arg("name") = ""); diff --git a/python_binding/operator/pybind_Concat.cpp b/python_binding/operator/pybind_Concat.cpp index 756686c209c33fe03f7bda4bbb53d8c3c71e8b4c..b08554a36c1bb955e36764c0147e0119a53d46e7 100644 --- a/python_binding/operator/pybind_Concat.cpp +++ b/python_binding/operator/pybind_Concat.cpp @@ -21,9 +21,9 @@ namespace Aidge { void init_Concat(py::module& m) { py::class_<Concat_Op, std::shared_ptr<Concat_Op>, Attributes, OperatorTensor>(m, "ConcatOp", py::multiple_inheritance()) - .def("get_inputs_name", &Concat_Op::getInputsName) - .def("get_outputs_name", &Concat_Op::getOutputsName) - .def("attributes_name", &Concat_Op::staticGetAttrsName); + .def_static("get_inputs_name", &Concat_Op::getInputsName) + .def_static("get_outputs_name", &Concat_Op::getOutputsName) + .def_static("attributes_name", &Concat_Op::staticGetAttrsName); declare_registrable<Concat_Op>(m, "ConcatOp"); m.def("Concat", &Concat, py::arg("nbIn"), py::arg("axis"), py::arg("name") = ""); diff --git a/python_binding/operator/pybind_Conv.cpp b/python_binding/operator/pybind_Conv.cpp index adb0e108c409032c7e132016f5b92ed9f9233491..0f4b970d6c192ac4c90d7d6d4b8fe5bfa184845d 100644 --- a/python_binding/operator/pybind_Conv.cpp +++ b/python_binding/operator/pybind_Conv.cpp @@ -42,9 +42,9 @@ template <DimIdx_t DIM> void declare_ConvOp(py::module &m) { py::arg("stride_dims"), py::arg("dilation_dims"), py::arg("no_bias")) - .def("get_inputs_name", &Conv_Op<DIM>::getInputsName) - .def("get_outputs_name", &Conv_Op<DIM>::getOutputsName) - .def("attributes_name", &Conv_Op<DIM>::staticGetAttrsName) + .def_static("get_inputs_name", &Conv_Op<DIM>::getInputsName) + .def_static("get_outputs_name", &Conv_Op<DIM>::getOutputsName) + .def_static("attributes_name", &Conv_Op<DIM>::staticGetAttrsName) ; declare_registrable<Conv_Op<DIM>>(m, pyClassName); diff --git a/python_binding/operator/pybind_ConvDepthWise.cpp b/python_binding/operator/pybind_ConvDepthWise.cpp index 19b3332a84037185afdc87fd90cb9c8fea2e64f8..be47f57d9bb36dc249d635bf3afb874d1df51308 100644 --- a/python_binding/operator/pybind_ConvDepthWise.cpp +++ b/python_binding/operator/pybind_ConvDepthWise.cpp @@ -41,9 +41,9 @@ template <DimIdx_t DIM> void declare_ConvDepthWiseOp(py::module &m) { py::arg("stride_dims"), py::arg("dilation_dims"), py::arg("no_bias")) - .def("get_inputs_name", &ConvDepthWise_Op<DIM>::getInputsName) - .def("get_outputs_name", &ConvDepthWise_Op<DIM>::getOutputsName) - .def("attributes_name", &ConvDepthWise_Op<DIM>::staticGetAttrsName); + .def_static("get_inputs_name", &ConvDepthWise_Op<DIM>::getInputsName) + .def_static("get_outputs_name", &ConvDepthWise_Op<DIM>::getOutputsName) + .def_static("attributes_name", &ConvDepthWise_Op<DIM>::staticGetAttrsName); declare_registrable<ConvDepthWise_Op<DIM>>(m, pyClassName); m.def(("ConvDepthWise" + std::to_string(DIM) + "D").c_str(), [](const DimSize_t nb_channels, const std::vector<DimSize_t>& kernel_dims, diff --git a/python_binding/operator/pybind_Div.cpp b/python_binding/operator/pybind_Div.cpp index e9bf26b629aa05090c9601103676cbc12ff4c88d..2f7dbac6317f107976b9de72463a9c794c8edaf4 100644 --- a/python_binding/operator/pybind_Div.cpp +++ b/python_binding/operator/pybind_Div.cpp @@ -20,8 +20,8 @@ namespace Aidge { void init_Div(py::module& m) { py::class_<Div_Op, std::shared_ptr<Div_Op>, OperatorTensor>(m, "DivOp", py::multiple_inheritance()) - .def("get_inputs_name", &Div_Op::getInputsName) - .def("get_outputs_name", &Div_Op::getOutputsName); + .def_static("get_inputs_name", &Div_Op::getInputsName) + .def_static("get_outputs_name", &Div_Op::getOutputsName); declare_registrable<Div_Op>(m, "DivOp"); m.def("Div", &Div, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_Erf.cpp b/python_binding/operator/pybind_Erf.cpp index c5fd53f2a665b5b816a3778e6f874cd04956e99e..4979ce54f72c12ff564d10ebf6fbd38aaec81e92 100644 --- a/python_binding/operator/pybind_Erf.cpp +++ b/python_binding/operator/pybind_Erf.cpp @@ -20,8 +20,8 @@ namespace Aidge { void init_Erf(py::module& m) { py::class_<Erf_Op, std::shared_ptr<Erf_Op>, OperatorTensor>(m, "ErfOp", py::multiple_inheritance()) - .def("get_inputs_name", &Erf_Op::getInputsName) - .def("get_outputs_name", &Erf_Op::getOutputsName); + .def_static("get_inputs_name", &Erf_Op::getInputsName) + .def_static("get_outputs_name", &Erf_Op::getOutputsName); declare_registrable<Erf_Op>(m, "ErfOp"); m.def("Erf", &Erf, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_FC.cpp b/python_binding/operator/pybind_FC.cpp index ab1ed9ce20bec01e205cd6478c6a93df9f91a2fb..185df9220bf112d729431b497b9c49af8997b7b8 100644 --- a/python_binding/operator/pybind_FC.cpp +++ b/python_binding/operator/pybind_FC.cpp @@ -22,9 +22,9 @@ namespace Aidge { void declare_FC(py::module &m) { py::class_<FC_Op, std::shared_ptr<FC_Op>, Attributes, OperatorTensor>(m, "FCOp", py::multiple_inheritance()) - .def("get_inputs_name", &FC_Op::getInputsName) - .def("get_outputs_name", &FC_Op::getOutputsName) - .def("attributes_name", &FC_Op::staticGetAttrsName); + .def_static("get_inputs_name", &FC_Op::getInputsName) + .def_static("get_outputs_name", &FC_Op::getOutputsName) + .def_static("attributes_name", &FC_Op::staticGetAttrsName); declare_registrable<FC_Op>(m, "FCOp"); m.def("FC", &FC, py::arg("in_channels"), py::arg("out_channels"), py::arg("nobias") = false, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_Gather.cpp b/python_binding/operator/pybind_Gather.cpp index e5507e670c1ec0bf4758169a9ea9864ff3fe29be..2c6d5f3cf0af893c12e31659f30f1059c52c3a26 100644 --- a/python_binding/operator/pybind_Gather.cpp +++ b/python_binding/operator/pybind_Gather.cpp @@ -22,9 +22,9 @@ namespace Aidge { void init_Gather(py::module& m) { py::class_<Gather_Op, std::shared_ptr<Gather_Op>, Attributes, OperatorTensor>(m, "GatherOp", py::multiple_inheritance()) - .def("get_inputs_name", &Gather_Op::getInputsName) - .def("get_outputs_name", &Gather_Op::getOutputsName) - .def("attributes_name", &Gather_Op::staticGetAttrsName); + .def_static("get_inputs_name", &Gather_Op::getInputsName) + .def_static("get_outputs_name", &Gather_Op::getOutputsName) + .def_static("attributes_name", &Gather_Op::staticGetAttrsName); declare_registrable<Gather_Op>(m, "GatherOp"); m.def("Gather", &Gather, py::arg("axis") = 0, py::arg("indices") = std::vector<std::int64_t>(), py::arg("gathered_shape") = std::vector<std::size_t>(), py::arg("name") = ""); diff --git a/python_binding/operator/pybind_GlobalAveragePooling.cpp b/python_binding/operator/pybind_GlobalAveragePooling.cpp index 08c8ad6f9c6b742eee9e9b0ad1ac20217d152bda..b5f19894618fa5ee14fdc346f0b59cc87814a724 100644 --- a/python_binding/operator/pybind_GlobalAveragePooling.cpp +++ b/python_binding/operator/pybind_GlobalAveragePooling.cpp @@ -23,8 +23,8 @@ void init_GlobalAveragePooling(py::module &m) { py::class_<GlobalAveragePooling_Op, std::shared_ptr<GlobalAveragePooling_Op>, OperatorTensor>(m, pyClassName.c_str(), py::multiple_inheritance()) - .def("get_inputs_name", &GlobalAveragePooling_Op::getInputsName) - .def("get_outputs_name", &GlobalAveragePooling_Op::getOutputsName); + .def_static("get_inputs_name", &GlobalAveragePooling_Op::getInputsName) + .def_static("get_outputs_name", &GlobalAveragePooling_Op::getOutputsName); declare_registrable<GlobalAveragePooling_Op>(m, pyClassName); m.def("globalaveragepooling", &GlobalAveragePooling, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_Identity.cpp b/python_binding/operator/pybind_Identity.cpp index 4538b72fcb012a35ca0ebf3a15449a4b5cfff7a8..1ab87309358ee700182db1e7c39009cf56c45c7d 100644 --- a/python_binding/operator/pybind_Identity.cpp +++ b/python_binding/operator/pybind_Identity.cpp @@ -20,8 +20,8 @@ namespace Aidge { void init_Identity(py::module& m) { py::class_<Identity_Op, std::shared_ptr<Identity_Op>, Operator>(m, "IdentityOp", py::multiple_inheritance()) - .def("get_inputs_name", &Identity_Op::getInputsName) - .def("get_outputs_name", &Identity_Op::getOutputsName); + .def_static("get_inputs_name", &Identity_Op::getInputsName) + .def_static("get_outputs_name", &Identity_Op::getOutputsName); m.def("Identity", &Identity, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_LeakyReLU.cpp b/python_binding/operator/pybind_LeakyReLU.cpp index 9ad47e7a391698ae9b30d35d94f05e8b80138590..4fbef4b0dcd3b4c7128d36d1aee09225d5996b7c 100644 --- a/python_binding/operator/pybind_LeakyReLU.cpp +++ b/python_binding/operator/pybind_LeakyReLU.cpp @@ -20,9 +20,9 @@ namespace Aidge { void init_LeakyReLU(py::module& m) { py::class_<LeakyReLU_Op, std::shared_ptr<LeakyReLU_Op>, Attributes, OperatorTensor>(m, "LeakyReLUOp", py::multiple_inheritance()) - .def("get_inputs_name", &LeakyReLU_Op::getInputsName) - .def("get_outputs_name", &LeakyReLU_Op::getOutputsName) - .def("attributes_name", &LeakyReLU_Op::staticGetAttrsName); + .def_static("get_inputs_name", &LeakyReLU_Op::getInputsName) + .def_static("get_outputs_name", &LeakyReLU_Op::getOutputsName) + .def_static("attributes_name", &LeakyReLU_Op::staticGetAttrsName); declare_registrable<LeakyReLU_Op>(m, "LeakyReLUOp"); m.def("LeakyReLU", &LeakyReLU, py::arg("negative_slope") = 0.0f, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_Matmul.cpp b/python_binding/operator/pybind_Matmul.cpp index 73bfac04a78ec9b972ec984466dbae582b2c03dc..f56da5a2457f249efbce84d246a6e204d3d2ecd7 100644 --- a/python_binding/operator/pybind_Matmul.cpp +++ b/python_binding/operator/pybind_Matmul.cpp @@ -22,8 +22,8 @@ namespace Aidge { void init_MatMul(py::module &m) { py::class_<MatMul_Op, std::shared_ptr<MatMul_Op>, OperatorTensor>(m, "MatMulOp", py::multiple_inheritance()) - .def("get_inputs_name", &MatMul_Op::getInputsName) - .def("get_outputs_name", &MatMul_Op::getOutputsName); + .def_static("get_inputs_name", &MatMul_Op::getInputsName) + .def_static("get_outputs_name", &MatMul_Op::getOutputsName); declare_registrable<MatMul_Op>(m, "MatMulOp"); m.def("MatMul", &MatMul, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_MaxPooling.cpp b/python_binding/operator/pybind_MaxPooling.cpp index 91fa0489d8bedd16dd33424e33d7e15eea3e3ecb..befba918dff37e7d47a76c0c71bf48008244c2d0 100644 --- a/python_binding/operator/pybind_MaxPooling.cpp +++ b/python_binding/operator/pybind_MaxPooling.cpp @@ -36,9 +36,9 @@ template <DimIdx_t DIM> void declare_MaxPoolingOp(py::module &m) { py::arg("kernel_dims"), py::arg("stride_dims"), py::arg("ceil_mode")) - .def("get_inputs_name", &MaxPooling_Op<DIM>::getInputsName) - .def("get_outputs_name", &MaxPooling_Op<DIM>::getOutputsName) - .def("attributes_name", &MaxPooling_Op<DIM>::staticGetAttrsName); + .def_static("get_inputs_name", &MaxPooling_Op<DIM>::getInputsName) + .def_static("get_outputs_name", &MaxPooling_Op<DIM>::getOutputsName) + .def_static("attributes_name", &MaxPooling_Op<DIM>::staticGetAttrsName); declare_registrable<MaxPooling_Op<DIM>>(m, pyClassName); m.def(("MaxPooling" + std::to_string(DIM) + "D").c_str(), [](const std::vector<DimSize_t>& kernel_dims, const std::string& name, diff --git a/python_binding/operator/pybind_Mul.cpp b/python_binding/operator/pybind_Mul.cpp index 47c84c0e52f605a5466a63a5a5d0851fecedd2f8..60f8ea7012cbf322ff34685da875065c22b44ee0 100644 --- a/python_binding/operator/pybind_Mul.cpp +++ b/python_binding/operator/pybind_Mul.cpp @@ -20,8 +20,8 @@ namespace Aidge { void init_Mul(py::module& m) { py::class_<Mul_Op, std::shared_ptr<Mul_Op>, OperatorTensor>(m, "MulOp", py::multiple_inheritance()) - .def("get_inputs_name", &Mul_Op::getInputsName) - .def("get_outputs_name", &Mul_Op::getOutputsName); + .def_static("get_inputs_name", &Mul_Op::getInputsName) + .def_static("get_outputs_name", &Mul_Op::getOutputsName); declare_registrable<Mul_Op>(m, "MulOp"); m.def("Mul", &Mul, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_Pad.cpp b/python_binding/operator/pybind_Pad.cpp index 1cd9f074fe5241be11da0ea7d0d1ed5a1c5869c2..2bb635635c0be456071507aaf0bfbb76590f9a66 100644 --- a/python_binding/operator/pybind_Pad.cpp +++ b/python_binding/operator/pybind_Pad.cpp @@ -35,9 +35,9 @@ template <DimIdx_t DIM> void declare_PadOp(py::module &m) { py::arg("beginEndTuples"), py::arg("borderType") = PadBorderType::Constant, py::arg("borderValue") = 0.0) - .def("get_inputs_name", &Pad_Op<DIM>::getInputsName) - .def("get_outputs_name", &Pad_Op<DIM>::getOutputsName) - .def("attributes_name", &Pad_Op<DIM>::staticGetAttrsName) + .def_static("get_inputs_name", &Pad_Op<DIM>::getInputsName) + .def_static("get_outputs_name", &Pad_Op<DIM>::getOutputsName) + .def_static("attributes_name", &Pad_Op<DIM>::staticGetAttrsName) ; declare_registrable<Pad_Op<DIM>>(m, pyClassName); m.def(("Pad" + std::to_string(DIM) + "D").c_str(), [](const std::vector<DimSize_t>& beginEndTuples, diff --git a/python_binding/operator/pybind_Pop.cpp b/python_binding/operator/pybind_Pop.cpp index baae552270a4776d292047140e213dbe1566d35e..333e55b3daa9b661995756507e60d610a8ac84a0 100644 --- a/python_binding/operator/pybind_Pop.cpp +++ b/python_binding/operator/pybind_Pop.cpp @@ -20,8 +20,8 @@ namespace Aidge { void init_Pop(py::module& m) { py::class_<Pop_Op, std::shared_ptr<Pop_Op>, OperatorTensor, Attributes>(m, "PopOp", py::multiple_inheritance()) - .def("get_inputs_name", &Pop_Op::getInputsName) - .def("get_outputs_name", &Pop_Op::getOutputsName); + .def_static("get_inputs_name", &Pop_Op::getInputsName) + .def_static("get_outputs_name", &Pop_Op::getOutputsName); m.def("Pop", &Pop, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_Pow.cpp b/python_binding/operator/pybind_Pow.cpp index 9e9ef772cadddb1c7928060b503c388b094ed9f4..c88e699413b99ff93772fc44d867d32717767155 100644 --- a/python_binding/operator/pybind_Pow.cpp +++ b/python_binding/operator/pybind_Pow.cpp @@ -20,8 +20,8 @@ namespace Aidge { void init_Pow(py::module& m) { py::class_<Pow_Op, std::shared_ptr<Pow_Op>, OperatorTensor>(m, "PowOp", py::multiple_inheritance()) - .def("get_inputs_name", &Pow_Op::getInputsName) - .def("get_outputs_name", &Pow_Op::getOutputsName); + .def_static("get_inputs_name", &Pow_Op::getInputsName) + .def_static("get_outputs_name", &Pow_Op::getOutputsName); declare_registrable<Pow_Op>(m, "PowOp"); m.def("Pow", &Pow, py::arg("name") = ""); diff --git a/python_binding/operator/pybind_Producer.cpp b/python_binding/operator/pybind_Producer.cpp index eb74515915c252d50a2522cae6d6f4c6832ab3ef..f1a60f4b20987c4ef489feff2e43a9c6f03916c9 100644 --- a/python_binding/operator/pybind_Producer.cpp +++ b/python_binding/operator/pybind_Producer.cpp @@ -36,9 +36,9 @@ void init_Producer(py::module &m) { "ProducerOp", py::multiple_inheritance()) .def("dims", &Producer_Op::dims) - .def("get_inputs_name", &Producer_Op::getInputsName) - .def("get_outputs_name", &Producer_Op::getOutputsName) - .def("attributes_name", &Producer_Op::staticGetAttrsName); + .def_static("get_inputs_name", &Producer_Op::getInputsName) + .def_static("get_outputs_name", &Producer_Op::getOutputsName) + .def_static("attributes_name", &Producer_Op::staticGetAttrsName); m.def("Producer", static_cast<std::shared_ptr<Node>(*)(const std::shared_ptr<Tensor>, const std::string&, bool)>(&Producer), py::arg("tensor"), py::arg("name") = "", py::arg("constant") = false); declare_registrable<Producer_Op>(m, "ProducerOp"); declare_Producer<1>(m); diff --git a/python_binding/operator/pybind_ReLU.cpp b/python_binding/operator/pybind_ReLU.cpp index 57601e25607a40c44c400fe75965d83050a146ed..ec8f43b69c189204ae30503ea77dc17ab845c135 100644 --- a/python_binding/operator/pybind_ReLU.cpp +++ b/python_binding/operator/pybind_ReLU.cpp @@ -20,8 +20,8 @@ namespace Aidge { void init_ReLU(py::module& m) { py::class_<ReLU_Op, std::shared_ptr<ReLU_Op>, OperatorTensor>(m, "ReLUOp", py::multiple_inheritance()) - .def("get_inputs_name", &ReLU_Op::getInputsName) - .def("get_outputs_name", &ReLU_Op::getOutputsName); + .def_static("get_inputs_name", &ReLU_Op::getInputsName) + .def_static("get_outputs_name", &ReLU_Op::getOutputsName); declare_registrable<ReLU_Op>(m, "ReLUOp"); m.def("ReLU", &ReLU, py::arg("name") = ""); diff --git a/python_binding/operator/pybind_ReduceMean.cpp b/python_binding/operator/pybind_ReduceMean.cpp index 599a648a3f2733acd49bbbc293cd30734e8ea2ff..150d06419845a0ddfa6fec3da904eae94dcd5b19 100644 --- a/python_binding/operator/pybind_ReduceMean.cpp +++ b/python_binding/operator/pybind_ReduceMean.cpp @@ -28,9 +28,9 @@ void declare_ReduceMeanOp(py::module &m) { const std::string pyClassName("ReduceMeanOp"); py::class_<ReduceMean_Op, std::shared_ptr<ReduceMean_Op>, Attributes, OperatorTensor>( m, pyClassName.c_str(), py::multiple_inheritance()) - .def("get_inputs_name", &ReduceMean_Op::getInputsName) - .def("get_outputs_name", &ReduceMean_Op::getOutputsName) - .def("attributes_name", &ReduceMean_Op::staticGetAttrsName) + .def_static("get_inputs_name", &ReduceMean_Op::getInputsName) + .def_static("get_outputs_name", &ReduceMean_Op::getOutputsName) + .def_static("attributes_name", &ReduceMean_Op::staticGetAttrsName) ; declare_registrable<ReduceMean_Op>(m, pyClassName); diff --git a/python_binding/operator/pybind_Reshape.cpp b/python_binding/operator/pybind_Reshape.cpp index 8d3d4ec07229d62bc7908793f845f560e43033b8..e987fd9cb36471af6a7fabc26ca51a887abc6880 100644 --- a/python_binding/operator/pybind_Reshape.cpp +++ b/python_binding/operator/pybind_Reshape.cpp @@ -20,8 +20,8 @@ namespace Aidge { void init_Reshape(py::module& m) { 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); + .def_static("get_inputs_name", &Reshape_Op::getInputsName) + .def_static("get_outputs_name", &Reshape_Op::getOutputsName); declare_registrable<Reshape_Op>(m, "ReshapeOp"); m.def("Reshape", &Reshape, py::arg("shape") = std::vector<std::int64_t>(), py::arg("allowzero") = false, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_Scaling.cpp b/python_binding/operator/pybind_Scaling.cpp index f091ea70f9b5e9927e535bd527cd84cf081d9823..23534f2d86cf8cebe0483dfa017f2d2e53c00a8c 100644 --- a/python_binding/operator/pybind_Scaling.cpp +++ b/python_binding/operator/pybind_Scaling.cpp @@ -19,12 +19,12 @@ namespace py = pybind11; namespace Aidge { -void init_Scaling(py::module& m) +void init_Scaling(py::module& m) { py::class_<Scaling_Op, std::shared_ptr<Scaling_Op>, Attributes, OperatorTensor>(m, "ScalingOp", py::multiple_inheritance()) - .def("get_inputs_name", &Scaling_Op::getInputsName) - .def("get_outputs_name", &Scaling_Op::getOutputsName) - .def("attributes_name", &Scaling_Op::staticGetAttrsName); + .def_static("get_inputs_name", &Scaling_Op::getInputsName) + .def_static("get_outputs_name", &Scaling_Op::getOutputsName) + .def_static("attributes_name", &Scaling_Op::staticGetAttrsName); declare_registrable<Scaling_Op>(m, "ScalingOp"); m.def("Scaling", &Scaling, py::arg("scaling_factor") = 1.0f, py::arg("nb_bits") = 8, py::arg("is_output_unsigned") = true, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_Sigmoid.cpp b/python_binding/operator/pybind_Sigmoid.cpp index 8ffa8581593af9dc994baa566475317bcd96d475..b9cb39dc1563f426e6885c798a157d7697db2866 100644 --- a/python_binding/operator/pybind_Sigmoid.cpp +++ b/python_binding/operator/pybind_Sigmoid.cpp @@ -20,8 +20,8 @@ namespace Aidge { void init_Sigmoid(py::module& m) { py::class_<Sigmoid_Op, std::shared_ptr<Sigmoid_Op>, OperatorTensor>(m, "SigmoidOp", py::multiple_inheritance()) - .def("get_inputs_name", &Sigmoid_Op::getInputsName) - .def("get_outputs_name", &Sigmoid_Op::getOutputsName); + .def_static("get_inputs_name", &Sigmoid_Op::getInputsName) + .def_static("get_outputs_name", &Sigmoid_Op::getOutputsName); m.def("Sigmoid", &Sigmoid, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_Slice.cpp b/python_binding/operator/pybind_Slice.cpp index 5270e2d921b87ae80559e58552cef59a7eb468e4..a7ee50a2097297621c304035a7ac4a73d14d892b 100644 --- a/python_binding/operator/pybind_Slice.cpp +++ b/python_binding/operator/pybind_Slice.cpp @@ -21,8 +21,8 @@ namespace Aidge { void init_Slice(py::module& m) { py::class_<Slice_Op, std::shared_ptr<Slice_Op>, OperatorTensor>(m, "SliceOp", py::multiple_inheritance()) - .def("get_inputs_name", &Slice_Op::getInputsName) - .def("get_outputs_name", &Slice_Op::getOutputsName); + .def_static("get_inputs_name", &Slice_Op::getInputsName) + .def_static("get_outputs_name", &Slice_Op::getOutputsName); declare_registrable<Slice_Op>(m, "SliceOp"); m.def("Slice", diff --git a/python_binding/operator/pybind_Softmax.cpp b/python_binding/operator/pybind_Softmax.cpp index 837f3ed2b92aeab5739d07a04b071040806d8a1f..1a50705510098eb009d47933c165750bfa9d6139 100644 --- a/python_binding/operator/pybind_Softmax.cpp +++ b/python_binding/operator/pybind_Softmax.cpp @@ -21,9 +21,9 @@ namespace Aidge { void init_Softmax(py::module& m) { py::class_<Softmax_Op, std::shared_ptr<Softmax_Op>, Attributes, OperatorTensor>(m, "SoftmaxOp", py::multiple_inheritance()) - .def("get_inputs_name", &Softmax_Op::getInputsName) - .def("get_outputs_name", &Softmax_Op::getOutputsName) - .def("attributes_name", &Softmax_Op::staticGetAttrsName); + .def_static("get_inputs_name", &Softmax_Op::getInputsName) + .def_static("get_outputs_name", &Softmax_Op::getOutputsName) + .def_static("attributes_name", &Softmax_Op::staticGetAttrsName); declare_registrable<Softmax_Op>(m, "SoftmaxOp"); m.def("Softmax", &Softmax, py::arg("axis"), py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_Sqrt.cpp b/python_binding/operator/pybind_Sqrt.cpp index 7065b828eb18d77edce49726dd903045c7952977..9efb9a668f86dc9a5340aeaa5708f7bbf205e3e4 100644 --- a/python_binding/operator/pybind_Sqrt.cpp +++ b/python_binding/operator/pybind_Sqrt.cpp @@ -20,8 +20,8 @@ namespace Aidge { void init_Sqrt(py::module& m) { py::class_<Sqrt_Op, std::shared_ptr<Sqrt_Op>, OperatorTensor>(m, "SqrtOp", py::multiple_inheritance()) - .def("get_inputs_name", &Sqrt_Op::getInputsName) - .def("get_outputs_name", &Sqrt_Op::getOutputsName); + .def_static("get_inputs_name", &Sqrt_Op::getInputsName) + .def_static("get_outputs_name", &Sqrt_Op::getOutputsName); declare_registrable<Sqrt_Op>(m, "SqrtOp"); m.def("Sqrt", &Sqrt, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_Sub.cpp b/python_binding/operator/pybind_Sub.cpp index e031040dfe8373c07d1524cbe4f75f3744e2f312..4d2989a1b4308bd1580ce3fc2e23d1a6be69085e 100644 --- a/python_binding/operator/pybind_Sub.cpp +++ b/python_binding/operator/pybind_Sub.cpp @@ -20,8 +20,8 @@ namespace Aidge { void init_Sub(py::module& m) { py::class_<Sub_Op, std::shared_ptr<Sub_Op>, OperatorTensor>(m, "SubOp", py::multiple_inheritance()) - .def("get_inputs_name", &Sub_Op::getInputsName) - .def("get_outputs_name", &Sub_Op::getOutputsName); + .def_static("get_inputs_name", &Sub_Op::getInputsName) + .def_static("get_outputs_name", &Sub_Op::getOutputsName); declare_registrable<Sub_Op>(m, "SubOp"); m.def("Sub", &Sub, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_Tanh.cpp b/python_binding/operator/pybind_Tanh.cpp index a5c2f9dd5f2eab17e296f82788726210f976bd0d..f2ef989696ca28a03fb34c2a3c1814aa2a561098 100644 --- a/python_binding/operator/pybind_Tanh.cpp +++ b/python_binding/operator/pybind_Tanh.cpp @@ -20,8 +20,8 @@ namespace Aidge { void init_Tanh(py::module& m) { py::class_<Tanh_Op, std::shared_ptr<Tanh_Op>, OperatorTensor>(m, "TanhOp", py::multiple_inheritance()) - .def("get_inputs_name", &Tanh_Op::getInputsName) - .def("get_outputs_name", &Tanh_Op::getOutputsName); + .def_static("get_inputs_name", &Tanh_Op::getInputsName) + .def_static("get_outputs_name", &Tanh_Op::getOutputsName); m.def("Tanh", &Tanh, py::arg("name") = ""); } diff --git a/python_binding/operator/pybind_Transpose.cpp b/python_binding/operator/pybind_Transpose.cpp index 63b22608d1737f9a59caffd4517fc0e9cfc4dd91..7a857c4d1f8ba569ee7ccf711f60b4dfbdfddbd0 100644 --- a/python_binding/operator/pybind_Transpose.cpp +++ b/python_binding/operator/pybind_Transpose.cpp @@ -29,9 +29,9 @@ void declare_Transpose(py::module &m) { const std::string pyClassName("TransposeOp"); py::class_<Transpose_Op, std::shared_ptr<Transpose_Op>, Attributes, OperatorTensor>( m, "TransposeOp", py::multiple_inheritance()) - .def("get_inputs_name", &Transpose_Op::getInputsName) - .def("get_outputs_name", &Transpose_Op::getOutputsName) - .def("attributes_name", &Transpose_Op::staticGetAttrsName); + .def_static("get_inputs_name", &Transpose_Op::getInputsName) + .def_static("get_outputs_name", &Transpose_Op::getOutputsName) + .def_static("attributes_name", &Transpose_Op::staticGetAttrsName); declare_registrable<Transpose_Op>(m, pyClassName); m.def("Transpose", &Transpose, py::arg("output_dims_order"), py::arg("name") = ""); }