convert_quantize_dequantize.hpp
1 // Copyright (C) 2018-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include <vector>
8 #include <memory>
9 
10 #include <transformations_visibility.hpp>
11 
12 #include <ngraph/pass/graph_rewrite.hpp>
13 
14 namespace ngraph {
15 namespace pass {
16 
17 class TRANSFORMATIONS_API ConvertQuantizeDequantize;
18 
19 } // namespace pass
20 } // namespace ngraph
21 
22 /**
23  * @ingroup ie_transformation_common_api
24  * @brief ConvertQuantizeDequantize transformation replaces following graph:
25  * FakeQuantize->Convert->Convert->Subtract->Multiply with a single FakeQuantize.
26  * Restrictions:
27  * - quantized data type must be i8 or u8
28  * - 'levels' attribute to FakeQuantize must be equal to 256
29  * - (output_low, output_high) must be (-128, 127) or (0, 256) (depends on sign of quantized data type)
30  * - 'zero_point' and 'scale' must be broadcastable to FakeQuantize's output
31  */
32 
33 class ngraph::pass::ConvertQuantizeDequantize: public ngraph::pass::MatcherPass {
34 public:
35  NGRAPH_RTTI_DECLARATION;
37 };
ConvertQuantizeDequantize transformation replaces following graph: FakeQuantize->Convert->Convert->Su...
Definition: convert_quantize_dequantize.hpp:33
ngraph namespace
Definition: add_fake_quantize_fusion.hpp:14