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
10649e87
Commit
10649e87
authored
May 21, 2019
by
Adam Rogowiec
Committed by
arogowie-intel
May 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecesary class member.
parent
dfb7095d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
11 deletions
+9
-11
lstm_cell.cpp
src/ngraph/op/fused/lstm_cell.cpp
+7
-6
lstm_cell.hpp
src/ngraph/op/fused/lstm_cell.hpp
+2
-5
No files found.
src/ngraph/op/fused/lstm_cell.cpp
View file @
10649e87
...
...
@@ -125,10 +125,11 @@ op::LSTMCell::LSTMCell(const shared_ptr<Node>& X,
Shape
{
m_gates_count
*
get_hidden_size
()},
vector
<
float
>
(
m_gates_count
*
get_hidden_size
(),
0.
f
));
m_P
=
ngraph
::
op
::
Constant
::
create
(
element
::
f32
,
const
auto
&
peephole_weights
=
ngraph
::
op
::
Constant
::
create
(
element
::
f32
,
Shape
{
m_peepholes_count
*
get_hidden_size
()},
vector
<
float
>
(
m_peepholes_count
*
get_hidden_size
(),
0.
f
));
m_p_iof
=
builder
::
split
(
m_P
,
m_peepholes_count
);
m_p_iof
=
builder
::
split
(
peephole_weights
,
m_peepholes_count
);
constructor_validate_and_infer_types
();
}
...
...
@@ -152,7 +153,6 @@ op::LSTMCell::LSTMCell(const shared_ptr<Node>& X,
,
m_R
{
R
}
,
m_H_t
{
H_t
}
,
m_C_t
{
C_t
}
,
m_P
{
P
}
,
m_activation_f
{
get_activation_function
(
0
)}
,
m_activation_g
{
get_activation_function
(
1
)}
,
m_activation_h
{
get_activation_function
(
2
)}
...
...
@@ -174,15 +174,16 @@ op::LSTMCell::LSTMCell(const shared_ptr<Node>& X,
m_bias
=
b_W_R
.
at
(
0
)
+
b_W_R
.
at
(
1
);
}
if
(
!
m_P
)
auto
peephole_weights
=
P
;
if
(
!
peephole_weights
)
{
m_P
=
peephole_weights
=
ngraph
::
op
::
Constant
::
create
(
element
::
f32
,
Shape
{
m_peepholes_count
*
get_hidden_size
()},
vector
<
float
>
(
m_peepholes_count
*
get_hidden_size
(),
0.
f
));
}
m_p_iof
=
builder
::
split
(
m_P
,
m_peepholes_count
);
m_p_iof
=
builder
::
split
(
peephole_weights
,
m_peepholes_count
);
constructor_validate_and_infer_types
();
}
...
...
src/ngraph/op/fused/lstm_cell.hpp
View file @
10649e87
...
...
@@ -164,11 +164,6 @@ namespace ngraph
///
std
::
shared_ptr
<
Node
>
m_C_t
;
///
/// \brief The weight tensor for peepholes with shape: [3*hidde_size] - 3 equals to
/// only iof gates.
///
std
::
shared_ptr
<
Node
>
m_P
;
///
/// \brief The Activation function f.
///
ActivationFunction
m_activation_f
;
...
...
@@ -190,6 +185,8 @@ namespace ngraph
///
/// \brief Peephole weights vector for respectively: input, output, and forget gates.
///
/// Each peephole has shape [hidden_size].
///
NodeVector
m_p_iof
;
///
/// \brief Sum of biases (weight and recurrence) for input, output, forget, and cell gates.
...
...
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