Commit 9d6159b0 authored by Janjic's avatar Janjic
Browse files

fix op_shape_test in scatternd_op.hpp file

parent 9d2003a2
......@@ -91,8 +91,8 @@ struct scatternd_op : op_name<Derived>
auto data_dims = data_shape.to_dynamic().dyn_dims();
// Check that corresponding portions of tensor shapes match.
if(not(std::equal(ind_dims.begin(), ind_dims.begin() + q - 1, upd_dims.begin()) and
std::equal(data_dims.begin() + k, data_dims.end(), upd_dims.begin() + q - 1)))
if(not(std::equal(ind_dims.begin(), std::next(ind_dims.begin(), q - 1), upd_dims.begin()) and
std::equal(std::next(data_dims.begin(), k), data_dims.end(), std::next(upd_dims.begin(), q - 1))))
MIGRAPHX_THROW("ScatterND: incorrect update shape. Update dimensions must match "
"indices and data.");
......
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