proposal_scales_stridedslice.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 Proposal1Scales;
18 class TRANSFORMATIONS_API Proposal4Scales;
19 
20 } // namespace pass
21 } // namespace ngraph
22 
23 /**
24  * @ingroup ie_transformation_common_api
25  * @brief ProposalScales transformation helps to silently avoid reshape issues on the scale-input of Proposal layer.
26  *
27  * Expected sub-graph looks like:
28  * Parameter [batch, 3 or 4] -> Reshape [-1] -(in: 3)-> PriorBox
29  *
30  * PriorBox operation accepts 3 or 4 values as scales from specification standpoint
31  * PriorBox uses first set (batch) of scale values to proceed in the plugins
32  * According to this we explicitly take first batch of scales with StridedSlice operation
33  *
34  * Resulting sub-graph:
35  * Parameter [batch, 3 or 4] -> Reshape [-1] -> StridedSlice[0: 3 or 4] -(in: 3)-> PriorBox
36  */
37 
38 class ngraph::pass::Proposal1Scales : public ngraph::pass::MatcherPass {
39 public:
40  NGRAPH_RTTI_DECLARATION;
42 };
43 
44 class ngraph::pass::Proposal4Scales : public ngraph::pass::MatcherPass {
45 public:
46  NGRAPH_RTTI_DECLARATION;
48 };
ProposalScales transformation helps to silently avoid reshape issues on the scale-input of Proposal l...
Definition: proposal_scales_stridedslice.hpp:38
Definition: proposal_scales_stridedslice.hpp:44
ngraph namespace
Definition: add_fake_quantize_fusion.hpp:14