Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / src / inference_engine / net_pass.h
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #pragma once
6
7 #include "ie_icnn_network.hpp"
8
9 #include <vector>
10 #include <string>
11 #include <map>
12
13 namespace InferenceEngine {
14 namespace NetPass {
15
16 /**
17  * Try to detect LSTM Sequence pattern inside TI and convert it
18  *
19  * @param net network to modify
20  * @return true if all Tensor iterator was converted
21  */
22 INFERENCE_ENGINE_API_CPP(bool) CombineRNNSeq(ICNNNetwork &net);
23
24 /**
25  * Unroll all present Tensor Iterators
26  *
27  * @param net network to modify
28  * @return true if all Tensor iterator was unrolled successfully
29  */
30 INFERENCE_ENGINE_API_CPP(bool) UnrollTI(ICNNNetwork &net);
31
32 /**
33  * Unroll all RNN specific layers by predicate
34  *
35  * Will be applied to all RNNSeq and RNNCell layers
36  *
37  * @param net network to modify
38  * @param pred predicate to mark layer to unroll
39  * @return true if all RNN layers was unrolled successfully
40  */
41 INFERENCE_ENGINE_API_CPP(bool) UnrollRNN_if(ICNNNetwork &net,
42         std::function<bool(const RNNCellBase&)> pred);
43
44 }  // namespace NetPass
45 }  // namespace InferenceEngine