ie_lstm_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 LSTMSequence layer
17  */
18 class INFERENCE_ENGINE_API_CLASS(LSTMSequenceLayer): public LayerDecorator {
19 public:
20  /**
21  * @brief The constructor creates a builder with the name
22  * @param name Layer name
23  */
24  explicit LSTMSequenceLayer(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 LSTMSequenceLayer(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 LSTMSequenceLayer(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  LSTMSequenceLayer& 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  LSTMSequenceLayer& 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  LSTMSequenceLayer& setOutputPorts(const std::vector<Port>& ports);
65 
66  int getHiddenSize() const;
67  LSTMSequenceLayer& setHiddenSize(int size);
68  bool getSequenceDim() const;
69  LSTMSequenceLayer& setSqquenceDim(bool flag);
70  const std::vector<std::string>& getActivations() const;
71  LSTMSequenceLayer& setActivations(const std::vector<std::string>& activations);
72  const std::vector<float>& getActivationsAlpha() const;
73  LSTMSequenceLayer& setActivationsAlpha(const std::vector<float>& activations);
74  const std::vector<float>& getActivationsBeta() const;
75  LSTMSequenceLayer& setActivationsBeta(const std::vector<float>& activations);
76  float getClip() const;
77  LSTMSequenceLayer& setClip(float clip);
78  bool getInputForget() const;
79  LSTMSequenceLayer& setInputForget(bool flag);
80  const std::string& getDirection() const;
81  LSTMSequenceLayer& setDirection(const std::string& direction);
82 };
83 
84 } // namespace Builder
85 } // namespace InferenceEngine
86 
87 
Definition: ie_argmax_layer.hpp:11