simplify_ctc_greedy_decoder_seq_len.hpp
1 // Copyright (C) 2018-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include <memory>
8 
9 #include <transformations_visibility.hpp>
10 
11 #include <ngraph/pass/graph_rewrite.hpp>
12 
13 namespace ngraph {
14 namespace pass {
15 
16 class TRANSFORMATIONS_API SimplifyCTCGreedyDecoderSeqLen;
17 
18 } // namespace pass
19 } // namespace ngraph
20 
21 /**
22  * @ingroup ie_transformation_common_api
23  * @brief SimplifyCTCGreedyDecoder converts v6:CTCGreedyDecoderSeqLen into v0::CTCGreedyDecoder.
24  *
25  * data[N, T, C] seq_len[N]
26  * \ /
27  * CTCGreedyDecoderSeqLen
28  *
29  * will be converted to
30  *
31  * data[T, N, C] seq_mask[T, N]
32  * \ /
33  * CTCGreedyDecoder
34  * / \
35  * class_index[N, T] seq_len[N]
36  *
37  * The transformation works only for case when the blank_index input == C-1, where C is the number of classes.
38  */
39 class ngraph::pass::SimplifyCTCGreedyDecoderSeqLen: public ngraph::pass::MatcherPass {
40 public:
41  NGRAPH_RTTI_DECLARATION;
43 };
SimplifyCTCGreedyDecoder converts v6:CTCGreedyDecoderSeqLen into v0::CTCGreedyDecoder.
Definition: simplify_ctc_greedy_decoder_seq_len.hpp:39
ngraph namespace
Definition: add_fake_quantize_fusion.hpp:14