"git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "95a5ba16a8173609b88ddff7a2d2c83bd1a504c7"
Commit 42f00caa authored by wsttiger's avatar wsttiger
Browse files

converted to std::any_of

parent 5d612a82
......@@ -365,12 +365,10 @@ struct squeeze
auto input_shape = inputs[0];
auto type = input_shape.type();
auto old_lens = input_shape.lens();
for(auto axis : axes)
if(std::any_of(
axes.begin(), axes.end(), [&](auto axis) { return input_shape.lens()[axis] != 1; }))
{
if(input_shape.lens()[axis] != 1)
{
MIGRAPH_THROW("squeeze axis dimension should be equal to 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