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
42f00caa
"vscode:/vscode.git/clone" did not exist on "cf8cc83586a6d04bad42546fd78f5985ac99fa59"
Commit
42f00caa
authored
Sep 26, 2018
by
wsttiger
Browse files
converted to std::any_of
parent
5d612a82
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
src/include/migraph/operators.hpp
src/include/migraph/operators.hpp
+3
-5
No files found.
src/include/migraph/operators.hpp
View file @
42f00caa
...
...
@@ -365,13 +365,11 @@ struct squeeze
auto
input_shape
=
inputs
[
0
];
auto
type
=
input_shape
.
type
();
auto
old_lens
=
input_shape
.
lens
();
for
(
auto
axis
:
axes
)
{
if
(
input_shape
.
lens
()[
axis
]
!=
1
)
if
(
std
::
any_of
(
axes
.
begin
(),
axes
.
end
(),
[
&
](
auto
axis
)
{
return
input_shape
.
lens
()[
axis
]
!=
1
;
}))
{
MIGRAPH_THROW
(
"squeeze axis dimension should be equal to 1"
);
}
}
std
::
vector
<
std
::
size_t
>
new_lens
;
if
(
axes
.
empty
())
{
...
...
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