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
gaoqiong
MIGraphX
Commits
27e34ff2
Commit
27e34ff2
authored
Jul 01, 2019
by
Shucai Xiao
Browse files
fix review comments
parent
5fb6c7db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
src/include/migraphx/op/argmax.hpp
src/include/migraphx/op/argmax.hpp
+3
-2
src/include/migraphx/op/argmin.hpp
src/include/migraphx/op/argmin.hpp
+3
-2
No files found.
src/include/migraphx/op/argmax.hpp
View file @
27e34ff2
...
@@ -45,9 +45,10 @@ struct argmax
...
@@ -45,9 +45,10 @@ struct argmax
for
(
std
::
size_t
i
=
1
;
i
<
item_num
;
++
i
)
for
(
std
::
size_t
i
=
1
;
i
<
item_num
;
++
i
)
{
{
indices
[
axis
]
=
i
;
indices
[
axis
]
=
i
;
if
(
max_val
<
input
(
indices
.
begin
(),
indices
.
end
()))
auto
cur_val
=
input
(
indices
.
begin
(),
indices
.
end
());
if
(
max_val
<
cur_val
)
{
{
max_val
=
input
(
indices
.
begin
(),
indices
.
end
())
;
max_val
=
cur_val
;
max_index
=
i
;
max_index
=
i
;
}
}
}
}
...
...
src/include/migraphx/op/argmin.hpp
View file @
27e34ff2
...
@@ -50,9 +50,10 @@ struct argmin
...
@@ -50,9 +50,10 @@ struct argmin
for
(
std
::
size_t
i
=
1
;
i
<
item_num
;
++
i
)
for
(
std
::
size_t
i
=
1
;
i
<
item_num
;
++
i
)
{
{
indices
[
axis
]
=
i
;
indices
[
axis
]
=
i
;
if
(
min_val
>
input
(
indices
.
begin
(),
indices
.
end
()))
auto
cur_val
=
input
(
indices
.
begin
(),
indices
.
end
());
if
(
min_val
>
cur_val
)
{
{
min_val
=
input
(
indices
.
begin
(),
indices
.
end
())
;
min_val
=
cur_val
;
min_index
=
i
;
min_index
=
i
;
}
}
}
}
...
...
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