"vscode:/vscode.git/clone" did not exist on "cf8cc83586a6d04bad42546fd78f5985ac99fa59"
Commit 42f00caa authored by wsttiger's avatar wsttiger
Browse files

converted to std::any_of

parent 5d612a82
......@@ -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())
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment