Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
5b459fd9
Commit
5b459fd9
authored
May 24, 2019
by
Adam Rogowiec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store original Bias input as RNNCell member.
parent
835dd295
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
28 deletions
+26
-28
rnn_cell.cpp
src/ngraph/op/fused/rnn_cell.cpp
+0
-0
rnn_cell.hpp
src/ngraph/op/fused/rnn_cell.hpp
+26
-28
No files found.
src/ngraph/op/fused/rnn_cell.cpp
View file @
5b459fd9
This diff is collapsed.
Click to expand it.
src/ngraph/op/fused/rnn_cell.hpp
View file @
5b459fd9
...
@@ -53,10 +53,10 @@ namespace ngraph
...
@@ -53,10 +53,10 @@ namespace ngraph
/// \param[in] hidden_size The number of hidden units for recurrent cell.
/// \param[in] hidden_size The number of hidden units for recurrent cell.
///
///
RNNCell
(
const
std
::
shared_ptr
<
Node
>&
X
,
RNNCell
(
const
std
::
shared_ptr
<
Node
>&
X
,
const
std
::
shared_ptr
<
Node
>&
W
,
const
std
::
shared_ptr
<
Node
>&
W
,
const
std
::
shared_ptr
<
Node
>&
R
,
const
std
::
shared_ptr
<
Node
>&
R
,
const
std
::
shared_ptr
<
Node
>&
H_t
,
const
std
::
shared_ptr
<
Node
>&
H_t
,
std
::
size_t
hidden_size
);
std
::
size_t
hidden_size
);
///
///
/// \brief Constructs RNNCell node.
/// \brief Constructs RNNCell node.
...
@@ -78,14 +78,14 @@ namespace ngraph
...
@@ -78,14 +78,14 @@ namespace ngraph
/// input of activation functions.
/// input of activation functions.
///
///
RNNCell
(
const
std
::
shared_ptr
<
Node
>&
X
,
RNNCell
(
const
std
::
shared_ptr
<
Node
>&
X
,
const
std
::
shared_ptr
<
Node
>&
W
,
const
std
::
shared_ptr
<
Node
>&
W
,
const
std
::
shared_ptr
<
Node
>&
R
,
const
std
::
shared_ptr
<
Node
>&
R
,
const
std
::
shared_ptr
<
Node
>&
H_t
,
const
std
::
shared_ptr
<
Node
>&
H_t
,
std
::
size_t
hidden_size
,
std
::
size_t
hidden_size
,
const
std
::
vector
<
std
::
string
>&
activations
,
const
std
::
vector
<
std
::
string
>&
activations
,
const
std
::
vector
<
float
>&
activation_alpha
,
const
std
::
vector
<
float
>&
activation_alpha
,
const
std
::
vector
<
float
>&
activation_beta
,
const
std
::
vector
<
float
>&
activation_beta
,
float
clip
);
float
clip
);
///
///
/// \brief Constructs RNNCell node.
/// \brief Constructs RNNCell node.
...
@@ -108,16 +108,15 @@ namespace ngraph
...
@@ -108,16 +108,15 @@ namespace ngraph
/// input of activation functions.
/// input of activation functions.
///
///
RNNCell
(
const
std
::
shared_ptr
<
Node
>&
X
,
RNNCell
(
const
std
::
shared_ptr
<
Node
>&
X
,
const
std
::
shared_ptr
<
Node
>&
W
,
const
std
::
shared_ptr
<
Node
>&
W
,
const
std
::
shared_ptr
<
Node
>&
R
,
const
std
::
shared_ptr
<
Node
>&
R
,
const
std
::
shared_ptr
<
Node
>&
H_t
,
const
std
::
shared_ptr
<
Node
>&
H_t
,
std
::
size_t
hidden_size
,
std
::
size_t
hidden_size
,
const
std
::
shared_ptr
<
Node
>&
B
,
const
std
::
shared_ptr
<
Node
>&
B
,
const
std
::
vector
<
std
::
string
>&
activations
=
const
std
::
vector
<
std
::
string
>&
activations
=
std
::
vector
<
std
::
string
>
{
"tanh"
},
std
::
vector
<
std
::
string
>
{
"tanh"
},
const
std
::
vector
<
float
>&
activation_alpha
=
{},
const
std
::
vector
<
float
>&
activation_alpha
=
{},
const
std
::
vector
<
float
>&
activation_beta
=
{},
const
std
::
vector
<
float
>&
activation_beta
=
{},
float
clip
=
0.
f
);
float
clip
=
0.
f
);
virtual
void
pre_validate_and_infer_types
()
override
;
virtual
void
pre_validate_and_infer_types
()
override
;
virtual
NodeVector
decompose_op
()
const
override
;
virtual
NodeVector
decompose_op
()
const
override
;
...
@@ -142,17 +141,16 @@ namespace ngraph
...
@@ -142,17 +141,16 @@ namespace ngraph
///
///
std
::
shared_ptr
<
Node
>
m_H_t
;
std
::
shared_ptr
<
Node
>
m_H_t
;
///
///
/// \brief The bias tensor for the gates. Shape: [2 * gates_count * hidden_size].
/// \note Concatenation of `[Wb[i], Rb[i]]`.
///
std
::
shared_ptr
<
Node
>
m_B
;
///
/// \brief The Activation function f.
/// \brief The Activation function f.
///
///
ActivationFunction
m_activation_f
;
ActivationFunction
m_activation_f
;
static
constexpr
std
::
size_t
m_gates_count
{
1
};
static
constexpr
std
::
size_t
m_gates_count
{
1
};
///
/// \brief Sum of biases (weight and recurrence) for input gate.
///
/// Sum of `[Wb, Rb]`.
///
std
::
shared_ptr
<
Node
>
m_bias
;
};
};
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment