Skip to content
Snippets Groups Projects
Commit 9fd586b0 authored by Maxence Naud's avatar Maxence Naud
Browse files

Merge branch 'deprecated_scaling_nodes' into 'dev'

Deprecate Scaling Node

See merge request !274
parents e7869ad3 966e274b
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,9 @@
#include "aidge/utils/StaticAttributes.hpp"
#include "aidge/utils/Types.h"
//Caution: This operator is now deprecated and should no longer be used.
//It has been replaced by the MetaOperator "Quantizer" (located directly in aidge_quantization).
namespace Aidge {
enum class ScalingAttr {
ScalingFactor, QuantizedNbBits, IsOutputUnsigned
......
......@@ -18,6 +18,10 @@
#include "aidge/utils/Registrar.hpp"
#include "aidge/utils/Types.h"
//Caution: This operator is now deprecated and should no longer be used.
//It has been replaced by the MetaOperator "Quantizer" (located directly in aidge_quantization).
const std::string Aidge::Scaling_Op::Type = "Scaling";
Aidge::Scaling_Op::Scaling_Op(float scalingFactor, std::size_t nbBits, bool isOutputUnsigned)
......@@ -26,12 +30,15 @@ Aidge::Scaling_Op::Scaling_Op(float scalingFactor, std::size_t nbBits, bool isOu
attr<ScalingAttr::ScalingFactor>(scalingFactor),
attr<ScalingAttr::QuantizedNbBits>(nbBits),
attr<ScalingAttr::IsOutputUnsigned>(isOutputUnsigned)))
{}
{
Log::warn("Caution: The [Scaling] operator is now deprecated and should no longer be used.\nIt has been replaced by the MetaOperator [Quantizer] (located directly in aidge_quantization).");
}
Aidge::Scaling_Op::Scaling_Op(const Aidge::Scaling_Op& op)
: OperatorTensor(op),
mAttributes(op.mAttributes)
{
Log::warn("Caution: The [Scaling] operator is now deprecated and should no longer be used. \nIt has been replaced by the MetaOperator [Quantizer] (located directly in aidge_quantization).");
if (op.mImpl){
SET_IMPL_MACRO(Scaling_Op, *this, op.backend());
} else {
......
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