ie_gru_sequence_layer.hpp
Go to the documentation of this file.
1 // Copyright (C) 2018-2020 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 /**
6  * @file
7  */
8 
9 #pragma once
10 
12 #include <ie_network.hpp>
13 #include <string>
14 #include <vector>
15 
16 namespace InferenceEngine {
17 namespace Builder {
18 
19 /**
20  * @deprecated Use ngraph API instead.
21  * @brief The class represents a builder for GRUSequence layer
22  */
23 IE_SUPPRESS_DEPRECATED_START
24 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(GRUSequenceLayer): public LayerDecorator {
25 public:
26  /**
27  * @brief The constructor creates a builder with the name
28  * @param name Layer name
29  */
30  explicit GRUSequenceLayer(const std::string& name = "");
31  /**
32  * @brief The constructor creates a builder from generic builder
33  * @param layer pointer to generic builder
34  */
35  explicit GRUSequenceLayer(const Layer::Ptr& layer);
36  /**
37  * @brief The constructor creates a builder from generic builder
38  * @param layer constant pointer to generic builder
39  */
40  explicit GRUSequenceLayer(const Layer::CPtr& layer);
41  /**
42  * @brief Sets the name for the layer
43  * @param name Layer name
44  * @return reference to layer builder
45  */
46  GRUSequenceLayer& setName(const std::string& name);
47 
48  /**
49  * @brief Returns input ports with shapes for the layer
50  * @return Vector of ports
51  */
52  const std::vector<Port>& getInputPorts() const;
53  /**
54  * @brief Sets input ports for the layer
55  * @param ports vector of input ports
56  * @return reference to layer builder
57  */
58  GRUSequenceLayer& setInputPorts(const std::vector<Port>& ports);
59 
60  /**
61  * @brief Returns output ports with shapes for the layer
62  * @return Vector of ports
63  */
64  const std::vector<Port>& getOutputPorts() const;
65  /**
66  * @brief Sets output ports for the layer
67  * @param ports vector of output ports
68  * @return reference to layer builder
69  */
70  GRUSequenceLayer& setOutputPorts(const std::vector<Port>& ports);
71 
72  int getHiddenSize() const;
73  GRUSequenceLayer& setHiddenSize(int size);
74  bool getSequenceDim() const;
75  GRUSequenceLayer& setSqquenceDim(bool flag);
76  const std::vector<std::string>& getActivations() const;
77  GRUSequenceLayer& setActivations(const std::vector<std::string>& activations);
78  const std::vector<float>& getActivationsAlpha() const;
79  GRUSequenceLayer& setActivationsAlpha(const std::vector<float>& activations);
80  const std::vector<float>& getActivationsBeta() const;
81  GRUSequenceLayer& setActivationsBeta(const std::vector<float>& activations);
82  float getClip() const;
83  GRUSequenceLayer& setClip(float clip);
84  bool getLinearBeforeReset() const;
85  GRUSequenceLayer& setLinearBeforeReset(bool flag);
86  const std::string& getDirection() const;
87  GRUSequenceLayer& setDirection(const std::string& direction);
88 };
89 IE_SUPPRESS_DEPRECATED_END
90 
91 } // namespace Builder
92 } // namespace InferenceEngine
Direction direction
Direction of iteration through sequence dimension.
Definition: ie_layers.h:1369
Inference Engine API.
Definition: ie_argmax_layer.hpp:15
std::shared_ptr< const Layer > CPtr
A shared pointer to the constant Layer builder.
Definition: ie_layer_builder.hpp:52
std::string name
Layer name.
Definition: ie_layers.h:42
This class defines the basic functional for layer builders.
Definition: ie_layer_decorator.hpp:26
std::shared_ptr< Layer > Ptr
A shared pointer to the Layer builder.
Definition: ie_layer_builder.hpp:48
float clip
Clip data into range [-clip, clip] on input of activations.
Definition: ie_layers.h:1168
A header file for the Inference Engine Network interface.
std::vector< std::string > activations
Activations used inside recurrent cell.
Definition: ie_layers.h:1174
The class represents a builder for GRUSequence layer.
Definition: ie_gru_sequence_layer.hpp:24