From 04d87091bf5cedd7b17056f1b132d9bb6dd3f116 Mon Sep 17 00:00:00 2001 From: NAUD Maxence <maxence.naud@cea.fr> Date: Mon, 25 Nov 2024 13:51:37 +0000 Subject: [PATCH] Add 'Resize_Op::attribute()' function to get 'attr' attribute in python binding --- include/aidge/operator/Resize.hpp | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/include/aidge/operator/Resize.hpp b/include/aidge/operator/Resize.hpp index a6346671b..c3c7838ef 100644 --- a/include/aidge/operator/Resize.hpp +++ b/include/aidge/operator/Resize.hpp @@ -167,33 +167,22 @@ class Resize_Op return Registrar<Resize_Op>::getKeys(); } - Interpolation::CoordinateTransformation &coordinateTransformationMode() { - return mAttributes - ->template getAttr<ResizeAttr::CoordinateTransformationMode>(); - } - Interpolation::CoordinateTransformation & - coordinateTransformationMode() const noexcept { + inline std::shared_ptr<Attributes> attributes() const override { return mAttributes; } + + inline Interpolation::CoordinateTransformation + coordinateTransformationMode() const { return mAttributes ->template getAttr<ResizeAttr::CoordinateTransformationMode>(); } - float &cubicCoefA() { + inline float cubicCoefA() const { return mAttributes->template getAttr<ResizeAttr::CubicCoeffA>(); } - Interpolation::Mode &interpolationMode() const noexcept { + inline Interpolation::Mode interpolationMode() const { return mAttributes->template getAttr<ResizeAttr::InterpolationMode>(); } - Interpolation::Mode &interpolationMode() { - return mAttributes->template getAttr<ResizeAttr::InterpolationMode>(); - } - PadBorderType &paddingMode() const noexcept { - return mAttributes->template getAttr<ResizeAttr::PaddingMode>(); - } - PadBorderType &paddingMode() { + inline PadBorderType paddingMode() const { return mAttributes->template getAttr<ResizeAttr::PaddingMode>(); } - // bool &excludeOutside() { - // return mAttributes->template getAttr<ResizeAttr::excludeOutside>(); - // } static const std::vector<std::string> getInputsName() { // roi, scales, sizes, even if considered as const parameters/input -- GitLab