bidirectional_sequences_decomposition.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 #include <string>
10 
11 #include <transformations_visibility.hpp>
12 
13 #include <ngraph/pass/graph_rewrite.hpp>
14 
15 namespace ngraph {
16 namespace pass {
17 
18 class TRANSFORMATIONS_API BidirectionalSequenceDecomposition;
19 
20 class TRANSFORMATIONS_API BidirectionalLSTMSequenceDecomposition;
21 class TRANSFORMATIONS_API BidirectionalGRUSequenceDecomposition;
22 class TRANSFORMATIONS_API BidirectionalRNNSequenceDecomposition;
23 
24 } // namespace pass
25 } // namespace ngraph
26 
27 /**
28  * @ingroup ie_transformation_common_api
29  * @brief Decompose LSTMSequence to forward and reverse LSTMSequence.
30  *
31  */
32 
33 class ngraph::pass::BidirectionalLSTMSequenceDecomposition : public ngraph::pass::MatcherPass {
34 public:
35  NGRAPH_RTTI_DECLARATION;
37 };
38 
39 /**
40  * @ingroup ie_transformation_common_api
41  * @brief Decompose GRUSequence to forward and reverse GRUSequence.
42  *
43  */
44 
45 class ngraph::pass::BidirectionalGRUSequenceDecomposition : public ngraph::pass::MatcherPass {
46 public:
47  NGRAPH_RTTI_DECLARATION;
49 };
50 
51 /**
52  * @ingroup ie_transformation_common_api
53  * @brief Decompose RNNSequence to forward and reverse RNNSequence.
54  *
55  */
56 
57 class ngraph::pass::BidirectionalRNNSequenceDecomposition : public ngraph::pass::MatcherPass {
58 public:
59  NGRAPH_RTTI_DECLARATION;
61 };
62 
63 /**
64  * @ingroup ie_transformation_common_api
65  * @brief Container for all types of sequences decomposition.
66  *
67  */
68 
69 class ngraph::pass::BidirectionalSequenceDecomposition : public ngraph::pass::GraphRewrite {
70 public:
71  NGRAPH_RTTI_DECLARATION;
73  add_matcher<ngraph::pass::BidirectionalLSTMSequenceDecomposition>();
74  add_matcher<ngraph::pass::BidirectionalGRUSequenceDecomposition>();
75  add_matcher<ngraph::pass::BidirectionalRNNSequenceDecomposition>();
76  }
77 };
Decompose GRUSequence to forward and reverse GRUSequence.
Definition: bidirectional_sequences_decomposition.hpp:45
Decompose LSTMSequence to forward and reverse LSTMSequence.
Definition: bidirectional_sequences_decomposition.hpp:33
Decompose RNNSequence to forward and reverse RNNSequence.
Definition: bidirectional_sequences_decomposition.hpp:57
Container for all types of sequences decomposition.
Definition: bidirectional_sequences_decomposition.hpp:69
ngraph namespace
Definition: add_fake_quantize_fusion.hpp:14