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
1c7f1b67
Commit
1c7f1b67
authored
Jun 26, 2019
by
Adam Rogowiec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
:Remove leftover commented code and apply style formatting
parent
239de984
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
21 deletions
+12
-21
lstm.cpp
src/ngraph/frontend/onnx_import/op/lstm.cpp
+0
-1
gru_cell.cpp
src/ngraph/op/fused/gru_cell.cpp
+1
-1
rnn_cell.cpp
src/ngraph/op/fused/rnn_cell.cpp
+1
-14
rnn_cell_base.cpp
src/ngraph/op/util/rnn_cell_base.cpp
+6
-4
rnn_cell_base.hpp
src/ngraph/op/util/rnn_cell_base.hpp
+4
-1
No files found.
src/ngraph/frontend/onnx_import/op/lstm.cpp
View file @
1c7f1b67
...
...
@@ -36,7 +36,6 @@
#include "ngraph/op/reverse.hpp"
#include "ngraph/op/select.hpp"
#include "ngraph/op/util/broadcasting.hpp"
#include "ngraph/op/util/reshape.hpp"
#include "ngraph/shape.hpp"
#include "ngraph/type/element_type.hpp"
#include "utils/reshape.hpp"
...
...
src/ngraph/op/fused/gru_cell.cpp
View file @
1c7f1b67
...
...
@@ -18,8 +18,8 @@
#include <cmath>
#include <functional>
#include "ngraph/builder/split.hpp"
#include "ngraph/builder/reshape.hpp"
#include "ngraph/builder/split.hpp"
#include "ngraph/op/add.hpp"
#include "ngraph/op/constant.hpp"
#include "ngraph/op/dot.hpp"
...
...
src/ngraph/op/fused/rnn_cell.cpp
View file @
1c7f1b67
...
...
@@ -18,8 +18,8 @@
#include <cmath>
#include <functional>
#include "ngraph/builder/split.hpp"
#include "ngraph/builder/reshape.hpp"
#include "ngraph/builder/split.hpp"
#include "ngraph/op/add.hpp"
#include "ngraph/op/constant.hpp"
#include "ngraph/op/dot.hpp"
...
...
@@ -191,19 +191,6 @@ NodeVector op::RNNCell::decompose_op() const
shared_ptr
<
Node
>
op
::
RNNCell
::
get_bias
()
const
{
// shared_ptr<Node> bias;
// if (get_input_size() == 5)
// {
// bias = get_argument(4);
// }
// else
// {
// // As default bias is all zeros, thus just initialize it with appropriate shape and zeros.
// bias = op::Constant::create(input(0).get_element_type(),
// Shape{2 * get_hidden_size()},
// vector<float>(2 * get_hidden_size(), 0.f));
// }
// return bias;
shared_ptr
<
Node
>
bias
;
// Split B onto Wb an Rb and add them.
NodeVector
b_W_R
=
builder
::
split
(
get_argument
(
4
),
2
);
...
...
src/ngraph/op/util/rnn_cell_base.cpp
View file @
1c7f1b67
...
...
@@ -69,20 +69,22 @@ op::util::ActivationFunction op::util::RNNCellBase::get_activation_function(size
return
afunc
;
}
shared_ptr
<
Node
>
op
::
util
::
RNNCellBase
::
add
(
const
shared_ptr
<
Node
>&
lhs
,
const
shared_ptr
<
Node
>&
rhs
)
shared_ptr
<
Node
>
op
::
util
::
RNNCellBase
::
add
(
const
shared_ptr
<
Node
>&
lhs
,
const
shared_ptr
<
Node
>&
rhs
)
{
auto
args
=
op
::
numpy_style_broadcast
({
lhs
,
rhs
});
return
{
make_shared
<
op
::
Add
>
(
args
.
at
(
0
),
args
.
at
(
1
))};
}
shared_ptr
<
Node
>
op
::
util
::
RNNCellBase
::
sub
(
const
shared_ptr
<
Node
>&
lhs
,
const
shared_ptr
<
Node
>&
rhs
)
shared_ptr
<
Node
>
op
::
util
::
RNNCellBase
::
sub
(
const
shared_ptr
<
Node
>&
lhs
,
const
shared_ptr
<
Node
>&
rhs
)
{
auto
args
=
op
::
numpy_style_broadcast
({
lhs
,
rhs
});
return
{
make_shared
<
op
::
Subtract
>
(
args
.
at
(
0
),
args
.
at
(
1
))};
}
shared_ptr
<
Node
>
op
::
util
::
RNNCellBase
::
mul
(
const
shared_ptr
<
Node
>&
lhs
,
const
shared_ptr
<
Node
>&
rhs
)
shared_ptr
<
Node
>
op
::
util
::
RNNCellBase
::
mul
(
const
shared_ptr
<
Node
>&
lhs
,
const
shared_ptr
<
Node
>&
rhs
)
{
auto
args
=
op
::
numpy_style_broadcast
({
lhs
,
rhs
});
return
{
make_shared
<
op
::
Multiply
>
(
args
.
at
(
0
),
args
.
at
(
1
))};
...
...
src/ngraph/op/util/rnn_cell_base.hpp
View file @
1c7f1b67
...
...
@@ -59,7 +59,10 @@ namespace ngraph
std
::
size_t
get_hidden_size
()
const
{
return
m_hidden_size
;
}
float
get_clip
()
const
{
return
m_clip
;
}
const
std
::
vector
<
std
::
string
>&
get_activations
()
const
{
return
m_activations
;
}
const
std
::
vector
<
float
>&
get_activation_alpha
()
const
{
return
m_activation_alpha
;
}
const
std
::
vector
<
float
>&
get_activation_alpha
()
const
{
return
m_activation_alpha
;
}
const
std
::
vector
<
float
>&
get_activation_beta
()
const
{
return
m_activation_beta
;
}
protected
:
///
...
...
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