diff --git a/paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp b/paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp index 1829f72a87054d9e4ead97962ca1f6738e585787..56c3951cfd47db814225b2710c18b16748ab4a6b 100644 --- a/paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp +++ b/paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp @@ -1344,7 +1344,7 @@ void RecurrentGradientMachine::fillGenOutputs() { CHECK(!finalPaths_[i].empty()); Path& path = finalPaths_[i][0]; generator_.ids.insert( - generator_.ids.begin(), path.ids.begin(), path.ids.end()); + generator_.ids.end(), path.ids.begin(), path.ids.end()); starts[i + 1] = starts[i] + path.ids.size(); } }