Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / include / builders / ie_rnn_sequence_layer.hpp
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #pragma once
6
7 #include <builders/ie_layer_decorator.hpp>
8 #include <ie_network.hpp>
9 #include <vector>
10 #include <string>
11
12 namespace InferenceEngine {
13 namespace Builder {
14
15 /**
16  * @brief The class represents a builder for RNNSequence layer
17  */
18 class INFERENCE_ENGINE_API_CLASS(RNNSequenceLayer): public LayerDecorator {
19 public:
20     /**
21      * @brief The constructor creates a builder with the name
22      * @param name Layer name
23      */
24     explicit RNNSequenceLayer(const std::string& name = "");
25     /**
26      * @brief The constructor creates a builder from generic builder
27      * @param layer pointer to generic builder
28      */
29     explicit RNNSequenceLayer(const Layer::Ptr& layer);
30     /**
31      * @brief The constructor creates a builder from generic builder
32      * @param layer constant pointer to generic builder
33      */
34     explicit RNNSequenceLayer(const Layer::CPtr& layer);
35     /**
36      * @brief Sets the name for the layer
37      * @param name Layer name
38      * @return reference to layer builder
39      */
40     RNNSequenceLayer& setName(const std::string& name);
41
42     /**
43      * @brief Returns input ports with shapes for the layer
44      * @return Vector of ports
45      */
46     const std::vector<Port>& getInputPorts() const;
47     /**
48      * @brief Sets input ports for the layer
49      * @param ports vector of input ports
50      * @return reference to layer builder
51      */
52     RNNSequenceLayer& setInputPorts(const std::vector<Port>& ports);
53
54     /**
55      * @brief Returns output ports with shapes for the layer
56      * @return Vector of ports
57      */
58     const std::vector<Port>& getOutputPorts() const;
59     /**
60      * @brief Sets output ports for the layer
61      * @param ports vector of output ports
62      * @return reference to layer builder
63      */
64     RNNSequenceLayer& setOutputPorts(const std::vector<Port>& ports);
65
66     int getHiddenSize() const;
67     RNNSequenceLayer& setHiddenSize(int size);
68     bool getSequenceDim() const;
69     RNNSequenceLayer& setSqquenceDim(bool flag);
70     const std::vector<std::string>& getActivations() const;
71     RNNSequenceLayer& setActivations(const std::vector<std::string>& activations);
72     const std::vector<float>& getActivationsAlpha() const;
73     RNNSequenceLayer& setActivationsAlpha(const std::vector<float>& activations);
74     const std::vector<float>& getActivationsBeta() const;
75     RNNSequenceLayer& setActivationsBeta(const std::vector<float>& activations);
76     float getClip() const;
77     RNNSequenceLayer& setClip(float clip);
78 };
79
80 }  // namespace Builder
81 }  // namespace InferenceEngine
82
83