auto id_itr = result.begin();
while (id_itr != result.end()) {
if (std::find(unused_ids.begin(), unused_ids.end(), *id_itr) != unused_ids.end())
- result.erase(id_itr);
+ id_itr = result.erase(id_itr);
else
id_itr++;
}
output_type = node.get_fused_output_layout().data_type;
}
+ if (static_cast<size_t>(axis) < 0 || static_cast<size_t>(axis) >= input_number_of_dims)
+ CLDNN_ERROR_MESSAGE(node.id(), "Incorrect axis value for ScatterUpdate: Axis must be positive and less than the input tensor dimension.");
+
if (indices_size > static_cast<size_t>(output_shape.sizes()[axis])) {
CLDNN_ERROR_MESSAGE(node.id(),
"Undefined behavior ScatterUpdate: indices size must not be larger than the output size along the Axis.");
}
-
+
if (nonempty_indices_dims + static_cast<size_t>(axis) > updates_number_of_dims) {
CLDNN_ERROR_MESSAGE(node.id(),
"Undefined behavior ScatterUpdate: indices dimention must not be larger than the updates[:Axis] dimentional size.");
}
-
- if (static_cast<size_t>(axis) < 0 || static_cast<size_t>(axis) >= input_number_of_dims)
- CLDNN_ERROR_MESSAGE(node.id(), "Incorrect axis value for ScatterUpdate: Axis must be positive and less than the input tensor dimension.");
return layout{output_type, input_format, output_shape};
}