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
f2b73a76
Commit
f2b73a76
authored
Jul 07, 2018
by
Pruthvi
Committed by
Scott Cyphers
Jul 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added predicate for alpha, in BoundedRelu (#1205)
parent
0768a969
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
cpu_fusion.cpp
src/ngraph/runtime/cpu/pass/cpu_fusion.cpp
+5
-1
No files found.
src/ngraph/runtime/cpu/pass/cpu_fusion.cpp
View file @
f2b73a76
...
...
@@ -1236,7 +1236,11 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_bounded_relu()
auto
relu
=
std
::
make_shared
<
op
::
Relu
>
(
relu_input
);
auto
iconst1
=
op
::
Constant
::
create
(
element
::
f32
,
Shape
{},
{
1
});
auto
alpha
=
std
::
make_shared
<
pattern
::
op
::
Label
>
(
iconst1
);
auto
min
=
std
::
make_shared
<
op
::
Minimum
>
(
relu
,
alpha
);
auto
broadcast_pred
=
[](
std
::
shared_ptr
<
Node
>
n
)
{
return
(
std
::
dynamic_pointer_cast
<
op
::
Broadcast
>
(
n
)
!=
nullptr
);
};
auto
skip_broadcast
=
std
::
make_shared
<
pattern
::
op
::
Skip
>
(
alpha
,
broadcast_pred
);
auto
min
=
std
::
make_shared
<
op
::
Minimum
>
(
relu
,
skip_broadcast
);
pattern
::
graph_rewrite_callback
callback
=
[
relu_input
,
alpha
](
pattern
::
Matcher
&
m
)
{
NGRAPH_DEBUG
<<
"In a callback for construct_bounded_relu against "
...
...
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