diff --git a/include/aidge/operator/Erf.hpp b/include/aidge/operator/Erf.hpp index 31157558d41a441112db8149d55efdc44352c370..1fa961c73ec244a14932611edc4881c113077c21 100644 --- a/include/aidge/operator/Erf.hpp +++ b/include/aidge/operator/Erf.hpp @@ -64,7 +64,7 @@ public: } void associateInput(const IOIndex_t inputIdx, std::shared_ptr<Data> data) override final { - assert(inputIdx == 0 && "operator supports only 1 input"); + assert(inputIdx == 0 && "Erf operator supports only 1 input"); (void) inputIdx; // avoid unused warning assert(strcmp(data->type(), Tensor::Type)==0 && "input data must be of Tensor type"); mInput = std::dynamic_pointer_cast<Tensor>(data); @@ -85,24 +85,24 @@ public: inline std::shared_ptr<Tensor> getInput(const IOIndex_t inputIdx) const override final { - assert((inputIdx == 0) && "Erf Operator has only 1 input"); + assert((inputIdx == 0) && "Erf operator has only 1 input"); (void) inputIdx; // avoid unused warning return mInput; } inline std::shared_ptr<Tensor> getOutput(const IOIndex_t outputIdx) const override final { - assert((outputIdx == 0) && "Erf Operator has only 1 output"); + assert((outputIdx == 0) && "Erf operator has only 1 output"); (void) outputIdx; // avoid unused warning return mOutput; } std::shared_ptr<Data> getRawInput(const IOIndex_t inputIdx) const override final { - assert(inputIdx == 0 && "operator supports only 1 input"); + assert(inputIdx == 0 && "Erf operator supports only 1 input"); (void) inputIdx; // avoid unused warning return std::static_pointer_cast<Data>(mInput); } std::shared_ptr<Data> getRawOutput(const IOIndex_t outputIdx) const override final { - assert(outputIdx == 0 && "operator supports only 1 output"); + assert(outputIdx == 0 && "Erf operator supports only 1 output"); (void) outputIdx; // avoid unused warning return std::static_pointer_cast<Data>(mOutput); } diff --git a/include/aidge/operator/Gather.hpp b/include/aidge/operator/Gather.hpp index 2167076de35f9cf07389f13a7065902783008552..3a2346d3fcc02f5cfae4cb888ff8440b92ccbcb4 100644 --- a/include/aidge/operator/Gather.hpp +++ b/include/aidge/operator/Gather.hpp @@ -79,7 +79,7 @@ public: } void associateInput(const IOIndex_t inputIdx, std::shared_ptr<Data> data) override final { - assert(inputIdx < 2 && "Gather supports only 2 inputs"); + assert(inputIdx < 2 && "Gather operator supports only 2 inputs"); assert(strcmp(data->type(), Tensor::Type)==0 && "input data must be of Tensor type"); mInputs[inputIdx] = std::dynamic_pointer_cast<Tensor>(data); } diff --git a/include/aidge/operator/ReduceMean.hpp b/include/aidge/operator/ReduceMean.hpp index 917f5bd37aaf09731bef0a01e49ca822ea333928..70440da2d083691a2d2b94342dec05d7a24750dd 100644 --- a/include/aidge/operator/ReduceMean.hpp +++ b/include/aidge/operator/ReduceMean.hpp @@ -115,24 +115,24 @@ class ReduceMean_Op : public Operator, inline std::shared_ptr<Tensor> getInput(const IOIndex_t inputIdx) const override final { - assert(inputIdx == 0 && "ReduceMean Operators supports only 1 input"); + assert(inputIdx == 0 && "ReduceMean operators supports only 1 input"); (void) inputIdx; // avoid unused warning return mInput; } inline std::shared_ptr<Tensor> getOutput(const IOIndex_t outputIdx) const override final { - assert((outputIdx == 0) && "ReduceMean Operator has only 1 output"); + assert((outputIdx == 0) && "ReduceMean operator has only 1 output"); (void) outputIdx; // avoid unused warning return mOutput; } std::shared_ptr<Data> getRawInput(const IOIndex_t inputIdx) const override final { - assert(inputIdx == 0 && "ReduceMean Operators supports only 1 input"); + assert(inputIdx == 0 && "ReduceMean operators supports only 1 input"); (void) inputIdx; // avoid unused warning return std::static_pointer_cast<Data>(mInput); } std::shared_ptr<Data> getRawOutput(const IOIndex_t outputIdx) const override final { - assert(outputIdx == 0 && "ReduceMean Operator supports only 1 output"); + assert(outputIdx == 0 && "ReduceMean operator supports only 1 output"); (void) outputIdx; // avoid unused warning return std::static_pointer_cast<Data>(mOutput); } diff --git a/include/aidge/operator/Reshape.hpp b/include/aidge/operator/Reshape.hpp index 62fe3e929439d24d4cd28044a15fd492075d241b..bc60fee91e8ff543daa091dcef1eed754affae2e 100644 --- a/include/aidge/operator/Reshape.hpp +++ b/include/aidge/operator/Reshape.hpp @@ -64,7 +64,7 @@ public: } void associateInput(const IOIndex_t inputIdx, std::shared_ptr<Data> data) override final { - assert(inputIdx < 2 && "Reshape Operator supports only 2 inputs"); + assert(inputIdx < 2 && "Reshape operator supports only 2 inputs"); assert(strcmp(data->type(), Tensor::Type)==0 && "input data must be of Tensor type"); mInputs[inputIdx] = std::dynamic_pointer_cast<Tensor>(data); } @@ -74,7 +74,7 @@ public: { std::vector<DimSize_t> outDims; int* shapeElem = static_cast<int*>(mInputs[1]->getImpl()->rawPtr()); - for(std::size_t i=0; i<mInputs[1]->nbDims(); ++i) + for(std::size_t i=0; i<mInputs[1]->size(); ++i) { outDims.push_back(shapeElem[i]); } @@ -95,24 +95,24 @@ public: inline std::shared_ptr<Tensor> getInput(const IOIndex_t inputIdx) const override final { - assert((inputIdx < 2) && "Reshape Operator has 2 inputs"); + assert((inputIdx < 2) && "Reshape operator has 2 inputs"); (void) inputIdx; // avoid unused warning return mInputs[inputIdx]; } inline std::shared_ptr<Tensor> getOutput(const IOIndex_t outputIdx) const override final { - assert((outputIdx == 0) && "Reshape Operator has only 1 output"); + assert((outputIdx == 0) && "Reshape operator has only 1 output"); (void) outputIdx; // avoid unused warning return mOutput; } std::shared_ptr<Data> getRawInput(const IOIndex_t inputIdx) const override final { - assert(inputIdx < 2 && "Reshape Operator supports only 2 inputs"); + assert(inputIdx < 2 && "Reshape operator supports only 2 inputs"); (void) inputIdx; // avoid unused warning return std::static_pointer_cast<Data>(mInputs[inputIdx]); } std::shared_ptr<Data> getRawOutput(const IOIndex_t outputIdx) const override final { - assert(outputIdx == 0 && "Reshape Operator supports only 1 output"); + assert(outputIdx == 0 && "Reshape operator supports only 1 output"); (void) outputIdx; // avoid unused warning return std::static_pointer_cast<Data>(mOutput); } diff --git a/python_binding/operator/pybind_ReduceMean.cpp b/python_binding/operator/pybind_ReduceMean.cpp index 90c00ff8e5fc29cac358234fc5092aa6a9668f8c..1df907734e95fba7baa24694766de1062fb35333 100644 --- a/python_binding/operator/pybind_ReduceMean.cpp +++ b/python_binding/operator/pybind_ReduceMean.cpp @@ -11,7 +11,6 @@ #include <pybind11/pybind11.h> #include <pybind11/stl.h> -#include <iostream> #include <string> #include <vector> #include <array> @@ -27,9 +26,6 @@ namespace Aidge { template <DimIdx_t DIM> void declare_ReduceMeanOp(py::module &m) { py::class_<ReduceMean_Op<DIM>, std::shared_ptr<ReduceMean_Op<DIM>>, Operator, Attributes>( m, ("ReduceMeanOp" + std::to_string(DIM) + "D").c_str(), py::multiple_inheritance()) -// .def(py::init<const std::array<DimSize_t, DIM> &, DimSize_t>(), -// py::arg("axes"), -// py::arg("keep_dims")) .def("get_inputs_name", &ReduceMean_Op<DIM>::getInputsName) .def("get_outputs_name", &ReduceMean_Op<DIM>::getOutputsName) ;