24 #include "ngraph/node.hpp"
25 #include "ngraph/op/util/activation_functions.hpp"
33 enum class LSTMWeightsFormat
56 std::shared_ptr<Node> NGRAPH_API
57 convert_lstm_node_format(
const Output<Node>& node,
58 LSTMWeightsFormat from_format,
59 LSTMWeightsFormat to_format = LSTMWeightsFormat::FICO);
82 std::size_t hidden_size,
84 const std::vector<std::string>& activations,
85 const std::vector<float>& activations_alpha,
86 const std::vector<float>& activations_beta);
102 std::size_t get_hidden_size()
const {
return m_hidden_size; }
103 float get_clip()
const {
return m_clip; }
104 const std::vector<std::string>& get_activations()
const {
return m_activations; }
105 const std::vector<float>& get_activations_alpha()
const
107 return m_activations_alpha;
109 const std::vector<float>& get_activations_beta()
const
111 return m_activations_beta;
132 static std::shared_ptr<Node>
add(
const Output<Node>& lhs,
const Output<Node>& rhs);
142 static std::shared_ptr<Node>
sub(
const Output<Node>& lhs,
const Output<Node>& rhs);
152 static std::shared_ptr<Node>
mul(
const Output<Node>& lhs,
const Output<Node>& rhs);
161 std::shared_ptr<Node>
clip(
const Output<Node>& data)
const;
164 std::size_t m_hidden_size;
166 std::vector<std::string> m_activations;
167 std::vector<float> m_activations_alpha;
168 std::vector<float> m_activations_beta;
void validate_input_rank_dimension(const std::vector< ngraph::PartialShape > &input)
Validates static rank and dimension for provided input parameters. Additionally input_size dimension ...
Base class for all recurrent network cells.
Definition: rnn_cell_base.hpp:66
static std::shared_ptr< Node > sub(const Output< Node > &lhs, const Output< Node > &rhs)
Creates node with element-wise subtract operation with numpy broadcasting.
static std::shared_ptr< Node > mul(const Output< Node > &lhs, const Output< Node > &rhs)
Creates node with element-wise multiply operation with numpy broadcasting.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28
ActivationFunction get_activation_function(std::size_t idx) const
Constructs activation function object.
RNNCellBase(const OutputVector &args, std::size_t hidden_size, float clip, const std::vector< std::string > &activations, const std::vector< float > &activations_alpha, const std::vector< float > &activations_beta)
Constructs a RNNCellBase class.
Class representing activation function used in RNN cells.
Definition: activation_functions.hpp:82
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:70
static std::shared_ptr< Node > add(const Output< Node > &lhs, const Output< Node > &rhs)
Creates node with element-wise add operation with numpy broadcasting.
std::shared_ptr< Node > clip(const Output< Node > &data) const
Creates node with element-wise clip operation with numpy broadcasting.
Root of all actual ops.
Definition: op.hpp:29