1 //*****************************************************************************
2 // Copyright 2017-2020 Intel Corporation
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //*****************************************************************************
19 #include "ngraph/axis_set.hpp"
20 #include "ngraph/op/op.hpp"
21 #include "ngraph/type/element_type.hpp"
29 /// \brief Dequantize operation
30 /// Maps quantized input (q) to real output (r) using scale (s) and zero point
33 class NGRAPH_DEPRECATED(
34 "This operation is deprecated and will be removed soon. Please do not use it.")
35 NGRAPH_API Dequantize : public ngraph::op::Op
37 NGRAPH_SUPPRESS_DEPRECATED_START
39 static constexpr NodeTypeInfo type_info{"Dequantize", 0};
40 const NodeTypeInfo& get_type_info() const override { return type_info; }
41 /// \brief Constructs a Dequantize operation
42 Dequantize() = default;
44 /// \brief Constructs a Dequantize operation
45 /// \param input quantized input
46 /// \param scale scale used for mapping
47 /// \param zero_point zero point used for mapping
48 /// \param type output element type
49 /// \param axes axis positions on which `scale` and `zero_point` are specified
50 Dequantize(const Output<Node>& input,
51 const Output<Node>& scale,
52 const Output<Node>& zero_point,
53 const element::Type& type,
56 void validate_and_infer_types() override;
58 virtual std::shared_ptr<Node>
59 clone_with_new_inputs(const OutputVector& new_args) const override;
61 const AxisSet& get_axes() const { return m_axes; }
62 void set_axes(const AxisSet& axes) { m_axes = axes; }
63 const element::Type& get_type() const { return m_type; }
64 void set_type(const element::Type& type) { m_type = type; }
68 NGRAPH_SUPPRESS_DEPRECATED_END
71 NGRAPH_SUPPRESS_DEPRECATED_START
73 NGRAPH_SUPPRESS_DEPRECATED_END