diff --git a/src/operator/ReduceMean.cpp b/src/operator/ReduceMean.cpp index bb2a18ca85f140ed7b3a77b1c1f6211a6c62b0a6..2a215d897884e936aa9265e5ae16b1774d94bae6 100644 --- a/src/operator/ReduceMean.cpp +++ b/src/operator/ReduceMean.cpp @@ -27,11 +27,12 @@ const std::string Aidge::ReduceMean_Op::Type = "ReduceMean"; -Aidge::ReduceMean_Op::ReduceMean_Op(const std::vector<std::int32_t>& axes, Aidge::DimSize_t keep_dims) +Aidge::ReduceMean_Op::ReduceMean_Op(const std::vector<std::int32_t>& axes, bool keep_dims, bool noop_with_empty_axes) : OperatorTensor(Type, {InputCategory::Data}, 1), mAttributes(std::make_shared<Attributes_>( attr<ReduceMeanAttr::Axes>(axes), - attr<ReduceMeanAttr::KeepDims>(keep_dims))) + attr<ReduceMeanAttr::KeepDims>(keep_dims), + attr<ReduceMeanAttr::NoopWithEmptyAxes>(noop_with_empty_axes))) {} Aidge::ReduceMean_Op::ReduceMean_Op(const Aidge::ReduceMean_Op& op) @@ -96,8 +97,9 @@ void Aidge::ReduceMean_Op::setBackend(const std::string& name, Aidge::DeviceIdx_ //////////////////////////////////////////// std::shared_ptr<Aidge::Node> Aidge::ReduceMean(const std::vector<std::int32_t> &axes, - Aidge::DimSize_t keep_dims, + bool keep_dims, + bool noop_with_empty_axes, const std::string& name) { AIDGE_ASSERT(axes.size()<=MaxDim, "Too many kernel dimensions required by ReduceMean, not supported"); - return std::make_shared<Node>(std::make_shared<ReduceMean_Op>(axes, keep_dims), name); + return std::make_shared<Node>(std::make_shared<ReduceMean_Op>(axes, keep_dims, noop_with_empty_axes), name); } \ No newline at end of file