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
714fc13a
Commit
714fc13a
authored
May 21, 2019
by
Adam Rogowiec
Committed by
arogowie-intel
May 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run validation at the end of constructor.
parent
8faaa4e6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
lstm_cell.cpp
src/ngraph/op/fused/lstm_cell.cpp
+2
-4
No files found.
src/ngraph/op/fused/lstm_cell.cpp
View file @
714fc13a
...
@@ -119,8 +119,6 @@ op::LSTMCell::LSTMCell(const shared_ptr<Node>& X,
...
@@ -119,8 +119,6 @@ op::LSTMCell::LSTMCell(const shared_ptr<Node>& X,
,
m_activation_h
{
get_activation_function
(
2
)}
,
m_activation_h
{
get_activation_function
(
2
)}
,
m_input_forget
{
input_forget
}
,
m_input_forget
{
input_forget
}
{
{
constructor_validate_and_infer_types
();
// Normally we would split B onto Wb an Rb and add them, however here they are all zeros,
// Normally we would split B onto Wb an Rb and add them, however here they are all zeros,
// thus just initialize bias with appropriate shape and zeros.
// thus just initialize bias with appropriate shape and zeros.
m_bias
=
ngraph
::
op
::
Constant
::
create
(
element
::
f32
,
m_bias
=
ngraph
::
op
::
Constant
::
create
(
element
::
f32
,
...
@@ -131,6 +129,7 @@ op::LSTMCell::LSTMCell(const shared_ptr<Node>& X,
...
@@ -131,6 +129,7 @@ op::LSTMCell::LSTMCell(const shared_ptr<Node>& X,
Shape
{
m_peepholes_count
*
get_hidden_size
()},
Shape
{
m_peepholes_count
*
get_hidden_size
()},
vector
<
float
>
(
m_peepholes_count
*
get_hidden_size
(),
0.
f
));
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
(
m_P
,
m_peepholes_count
);
constructor_validate_and_infer_types
();
}
}
op
::
LSTMCell
::
LSTMCell
(
const
shared_ptr
<
Node
>&
X
,
op
::
LSTMCell
::
LSTMCell
(
const
shared_ptr
<
Node
>&
X
,
...
@@ -183,9 +182,8 @@ op::LSTMCell::LSTMCell(const shared_ptr<Node>& X,
...
@@ -183,9 +182,8 @@ op::LSTMCell::LSTMCell(const shared_ptr<Node>& X,
vector
<
float
>
(
m_peepholes_count
*
get_hidden_size
(),
0.
f
));
vector
<
float
>
(
m_peepholes_count
*
get_hidden_size
(),
0.
f
));
}
}
constructor_validate_and_infer_types
();
m_p_iof
=
builder
::
split
(
m_P
,
m_peepholes_count
);
m_p_iof
=
builder
::
split
(
m_P
,
m_peepholes_count
);
constructor_validate_and_infer_types
();
}
}
void
op
::
LSTMCell
::
pre_validate_and_infer_types
()
void
op
::
LSTMCell
::
pre_validate_and_infer_types
()
...
...
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