You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eliminate loop-level vector heap allocations in backpropagation
- Reuse rnn_grads_row, given_outputs_vec, current_target, and deltas vectors across batch/time iterations in FFLayer, FFOutputLayer, LSTMLayer, and ElmanRNNLayer.
- Use pointer-based set_rnn_gradients inside output gradient calculation to prevent vector move/deallocation and reuse underlying vector memory capacity.
- Add unit test case RnnGradientsReusesCapacity to verify GradientsAndOutputs capacity preservation.
0 commit comments