Skip to content
Snippets Groups Projects
Commit 0daa24ea authored by Houssem ROUIS's avatar Houssem ROUIS
Browse files

Merge branch 'dev' of gitlab.eclipse.org:eclipse/aidge/aidge_core into fix/add_missing_attr

parents 8cce26f5 95481066
No related branches found
No related tags found
No related merge requests found
Showing
with 50 additions and 50 deletions
......@@ -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") = "");
}
......
......@@ -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") = "");
......
......@@ -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") = "");
......
......@@ -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);
......
......@@ -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,
......
......@@ -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") = "");
}
......
......@@ -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") = "");
}
......
......@@ -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") = "");
}
......
......@@ -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") = "");
......
......@@ -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") = "");
}
......
......@@ -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") = "");
}
......
......@@ -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") = "");
}
......
......@@ -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") = "");
}
......
......@@ -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,
......
......@@ -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") = "");
}
......
......@@ -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,
......
......@@ -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") = "");
}
......
......@@ -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") = "");
......
......@@ -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);
......
......@@ -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") = "");
......
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