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
5a1e3c5c
Commit
5a1e3c5c
authored
Jan 06, 2020
by
Tomasz Dołbniak
Committed by
Scott Cyphers
Jan 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use v1 ops in ONNX ThresholdedRelu (#4096)
Co-authored-by:
Sang Ik Lee
<
sang.ik.lee@intel.com
>
parent
0f2734dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
thresholded_relu.cpp
src/ngraph/frontend/onnx_import/op/thresholded_relu.cpp
+8
-12
No files found.
src/ngraph/frontend/onnx_import/op/thresholded_relu.cpp
View file @
5a1e3c5c
...
...
@@ -18,9 +18,6 @@
#include <vector>
#include "default_opset.hpp"
#include "ngraph/op/multiply.hpp"
#include "ngraph/op/util/broadcasting.hpp"
#include "ngraph/opsets/opset0.hpp"
#include "thresholded_relu.hpp"
namespace
ngraph
...
...
@@ -33,18 +30,17 @@ namespace ngraph
{
NodeVector
thresholded_relu
(
const
Node
&
node
)
{
auto
data
=
node
.
get_ng_inputs
().
at
(
0
);
double
alpha
=
node
.
get_attribute_value
<
double
>
(
"alpha"
,
1.0
);
const
auto
data
=
node
.
get_ng_inputs
().
at
(
0
);
const
double
alpha
=
node
.
get_attribute_value
<
double
>
(
"alpha"
,
1.0
);
std
::
shared_ptr
<
ngraph
::
Node
>
alpha_node
=
std
::
make_shared
<
default_opset
::
Constant
>
(
data
->
get_element_type
(),
data
->
get_shape
(),
std
::
vector
<
double
>
{
alpha
});
const
auto
alpha_node
=
default_opset
::
Constant
::
create
(
data
->
get_element_type
(),
data
->
get_shape
(),
{
alpha
});
auto
data_map
=
std
::
make_shared
<
default_opset
::
Convert
>
(
std
::
make_shared
<
ngraph
::
opset0
::
Greater
>
(
data
,
alpha_node
),
const
auto
data_map
=
std
::
make_shared
<
default_opset
::
Convert
>
(
std
::
make_shared
<
default_opset
::
Greater
>
(
data
,
alpha_node
),
data
->
get_element_type
());
return
{
data
*
data_map
};
return
{
std
::
make_shared
<
default_opset
::
Multiply
>
(
data
,
data_map
)};
}
}
// namespace set_1default_opset
...
...
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