1 // Copyright (C) 2020 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
8 #include <ngraph/ngraph.hpp>
10 #include "functional_test_utils/low_precision_transformations/layer_transformation.hpp"
11 #include "ngraph_functions/low_precision_transformations/common/dequantization_operations.hpp"
12 #include "ngraph_functions/subgraph_builders.hpp"
13 #include "ngraph_functions/low_precision_transformations/common/builders.hpp"
19 class AddActualValues {
21 ngraph::element::Type precision1;
22 std::vector<float> subtractValues1;
23 std::vector<float> mutliplyValues1;
24 ngraph::element::Type precision2;
25 std::vector<float> subtractValues2;
26 std::vector<float> mutliplyValues2;
29 inline std::ostream& operator<<(std::ostream& out, const AddActualValues& values) {
31 "_" << values.precision1 <<
32 "_subtract" << values.subtractValues1.size() <<
33 "_mutliply" << values.mutliplyValues1.size() <<
34 "_" << values.precision2 <<
35 "_subtract" << values.subtractValues2.size() <<
36 "_mutliply" << values.mutliplyValues2.size();
39 class AddExpectedValues {
41 ngraph::element::Type precision1;
42 std::vector<float> subtractValues1;
43 std::vector<float> mutliplyValues1;
44 ngraph::element::Type precision2;
45 std::vector<float> mutliplyValuesAfter;
48 inline std::ostream& operator<<(std::ostream& out, const AddExpectedValues& values) {
50 "_" << values.precision1 <<
51 "_subtract" << values.subtractValues1.size() <<
52 "_mutliply" << values.mutliplyValues1.size() <<
53 "_" << values.precision2 <<
54 "_mutliply" << values.mutliplyValuesAfter.size();
57 class ElementwiseWithMultiParentDequantizationFunction {
59 static std::shared_ptr<ngraph::Function> get(
60 const ngraph::element::Type precision,
61 const ngraph::Shape& inputShape,
62 const ngraph::pass::low_precision::LayerTransformation::Params& params,
63 const ngraph::element::Type& precision1,
64 const ngraph::builder::subgraph::DequantizationOperations& dequantization1,
65 const ngraph::element::Type& precision2,
66 const ngraph::builder::subgraph::DequantizationOperations& dequantization2);
69 } // namespace subgraph
70 } // namespace builder