Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
3ffd1052
"...git@developer.sourcefind.cn:OpenDAS/tilelang.git" did not exist on "58c6b912ac6f18fe15af2b34c190a97bf833ebfd"
Unverified
Commit
3ffd1052
authored
Oct 19, 2020
by
Duong Nhu
Committed by
GitHub
Oct 19, 2020
Browse files
Udpated concat axis to match image_data_format in keras (#2946)
parent
58873c46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/sdk/pynni/nni/nas/tensorflow/mutator.py
src/sdk/pynni/nni/nas/tensorflow/mutator.py
+6
-1
No files found.
src/sdk/pynni/nni/nas/tensorflow/mutator.py
View file @
3ffd1052
...
@@ -66,7 +66,12 @@ class Mutator(BaseMutator):
...
@@ -66,7 +66,12 @@ class Mutator(BaseMutator):
if
reduction_type
==
'mean'
:
if
reduction_type
==
'mean'
:
return
sum
(
tensor_list
)
/
len
(
tensor_list
)
return
sum
(
tensor_list
)
/
len
(
tensor_list
)
if
reduction_type
==
'concat'
:
if
reduction_type
==
'concat'
:
return
tf
.
concat
(
tensor_list
,
axis
=
0
)
image_data_format
=
tf
.
keras
.
backend
.
image_data_format
()
if
image_data_format
==
"channels_first"
:
axis
=
0
else
:
axis
=
-
1
return
tf
.
concat
(
tensor_list
,
axis
=
axis
)
raise
ValueError
(
'Unrecognized reduction policy: "{}'
.
format
(
reduction_type
))
raise
ValueError
(
'Unrecognized reduction policy: "{}'
.
format
(
reduction_type
))
def
_get_decision
(
self
,
mutable
):
def
_get_decision
(
self
,
mutable
):
...
...
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