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
b6bc86bf
Commit
b6bc86bf
authored
Jul 03, 2018
by
Nick Korovaiko
Committed by
Scott Cyphers
Jul 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TF-flavoured group convolution (#1182)
* tf group convolution * change perms
parent
2fc0bbb4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
cpu_mat_fusion.cpp
src/ngraph/runtime/cpu/pass/cpu_mat_fusion.cpp
+10
-2
No files found.
src/ngraph/runtime/cpu/pass/cpu_mat_fusion.cpp
View file @
b6bc86bf
...
...
@@ -254,6 +254,8 @@ std::shared_ptr<Node> fuse_group_convolution(const std::shared_ptr<Node>& n)
auto
concat
=
std
::
dynamic_pointer_cast
<
op
::
Concat
>
(
n
);
std
::
shared_ptr
<
op
::
Convolution
>
sconv
;
NodeVector
slices
;
const
size_t
CHANNEL
=
1
;
if
(
concat
->
get_concatenation_axis
()
!=
CHANNEL
)
{
...
...
@@ -296,9 +298,15 @@ std::shared_ptr<Node> fuse_group_convolution(const std::shared_ptr<Node>& n)
auto
slice
=
pattern_map
[
slice_weights_label
];
if
(
weights
->
get_shape
().
at
(
IC
)
!=
slice
->
get_shape
().
at
(
IC
))
{
NGRAPH_DEBUG
<<
"slices are done on the wrong axis (IC)"
;
return
{
nullptr
};
slices
.
push_back
(
slice
)
;
}
}
//TF-flavoured group convolution needs channels re-arranged
const
size_t
CONCAT_AXIS_OC
=
0
;
if
(
!
slices
.
empty
())
{
weights
=
std
::
make_shared
<
op
::
Concat
>
(
slices
,
CONCAT_AXIS_OC
);
}
auto
new_conv
=
std
::
make_shared
<
op
::
GroupConvolution
>
(
data
,
...
...
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