Commit a22d5db3 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

Merge branch 'gather_operator' into seq2seq_example

parents edd885ec 431f9558
...@@ -785,7 +785,7 @@ struct gather ...@@ -785,7 +785,7 @@ struct gather
{ {
auto start_it = data_idx.begin() + axis_index; auto start_it = data_idx.begin() + axis_index;
auto end_it = data_idx.begin() + axis_index + indices.get_shape().lens().size(); auto end_it = data_idx.begin() + axis_index + indices.get_shape().lens().size();
std::vector<T> ind_idx(start_it, end_it); std::vector<std::size_t> ind_idx(start_it, end_it);
data_idx.erase(start_it, end_it); data_idx.erase(start_it, end_it);
index = static_cast<std::size_t>(indices(ind_idx.begin(), ind_idx.end())); index = static_cast<std::size_t>(indices(ind_idx.begin(), ind_idx.end()));
} }
......
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