Add a section of how to link IE with CMake project (#99)
[platform/upstream/dldt.git] / inference-engine / src / inference_engine / shape_infer / built-in / ie_quantize_shape_infer.hpp
1 // Copyright (C) 2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #pragma once
6
7 #include <description_buffer.hpp>
8 #include "ie_built_in_impl.hpp"
9 #include <map>
10 #include <memory>
11 #include <string>
12 #include <vector>
13 #include <debug.h>
14 #include <cmath>
15 #include <algorithm>
16
17 namespace InferenceEngine {
18 namespace ShapeInfer {
19
20 /**
21  *@brief Implementation of Shape inference for quantize layer
22  */
23 class QuantizeShapeProp : public BuiltInShapeInferImpl {
24 public:
25     explicit QuantizeShapeProp(const std::string& type) : BuiltInShapeInferImpl(type) {}
26
27     void inferShapesImpl(const std::vector<Blob::CPtr>& inBlobs,
28                          const std::map<std::string, std::string>& params,
29                          const std::map<std::string, Blob::Ptr>& blobs,
30                          std::vector<SizeVector>& outShapes) override {
31         LayerParams lp{};
32         QuantizeLayer quantizeLayer(lp);
33         quantizeLayer.params = params;
34         quantizeLayer.type = _type;
35         validate(&quantizeLayer, inBlobs, params, blobs);
36
37         outShapes.push_back(inShapes[0]);
38     }
39 };
40
41 }  // namespace ShapeInfer
42 }  // namespace InferenceEngine