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 <string>
10 #include <vector>
11 
12 namespace InferenceEngine {
13 namespace Builder {
14 
15 /**
16  * @deprecated Use ngraph API instead.
17  * @brief The class represents a builder for LSTMSequence layer
18  */
19 IE_SUPPRESS_DEPRECATED_START
20 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(LSTMSequenceLayer): public LayerDecorator {
21 public:
22  /**
23  * @brief The constructor creates a builder with the name
24  * @param name Layer name
25  */
26  explicit LSTMSequenceLayer(const std::string& name = "");
27  /**
28  * @brief The constructor creates a builder from generic builder
29  * @param layer pointer to generic builder
30  */
31  explicit LSTMSequenceLayer(const Layer::Ptr& layer);
32  /**
33  * @brief The constructor creates a builder from generic builder
34  * @param layer constant pointer to generic builder
35  */
36  explicit LSTMSequenceLayer(const Layer::CPtr& layer);
37  /**
38  * @brief Sets the name for the layer
39  * @param name Layer name
40  * @return reference to layer builder
41  */
42  LSTMSequenceLayer& setName(const std::string& name);
43 
44  /**
45  * @brief Returns input ports with shapes for the layer
46  * @return Vector of ports
47  */
48  const std::vector<Port>& getInputPorts() const;
49  /**
50  * @brief Sets input ports for the layer
51  * @param ports vector of input ports
52  * @return reference to layer builder
53  */
54  LSTMSequenceLayer& setInputPorts(const std::vector<Port>& ports);
55 
56  /**
57  * @brief Returns output ports with shapes for the layer
58  * @return Vector of ports
59  */
60  const std::vector<Port>& getOutputPorts() const;
61  /**
62  * @brief Sets output ports for the layer
63  * @param ports vector of output ports
64  * @return reference to layer builder
65  */
66  LSTMSequenceLayer& setOutputPorts(const std::vector<Port>& ports);
67 
68  int getHiddenSize() const;
69  LSTMSequenceLayer& setHiddenSize(int size);
70  bool getSequenceDim() const;
71  LSTMSequenceLayer& setSqquenceDim(bool flag);
72  const std::vector<std::string>& getActivations() const;
73  LSTMSequenceLayer& setActivations(const std::vector<std::string>& activations);
74  const std::vector<float>& getActivationsAlpha() const;
75  LSTMSequenceLayer& setActivationsAlpha(const std::vector<float>& activations);
76  const std::vector<float>& getActivationsBeta() const;
77  LSTMSequenceLayer& setActivationsBeta(const std::vector<float>& activations);
78  float getClip() const;
79  LSTMSequenceLayer& setClip(float clip);
80  bool getInputForget() const;
81  LSTMSequenceLayer& setInputForget(bool flag);
82  const std::string& getDirection() const;
83  LSTMSequenceLayer& setDirection(const std::string& direction);
84 };
85 IE_SUPPRESS_DEPRECATED_END
86 
87 } // namespace Builder
88 } // namespace InferenceEngine
Inference Engine API.
Definition: ie_argmax_layer.hpp:11