From 41e1484eb2c8c15e4a329ff48419404043c55d0c Mon Sep 17 00:00:00 2001 From: hedaoyuan Date: Tue, 25 Jul 2017 14:18:06 +0800 Subject: [PATCH] Fix hl_sequence_avg_forward. --- paddle/cuda/src/hl_cuda_sequence.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/cuda/src/hl_cuda_sequence.cu b/paddle/cuda/src/hl_cuda_sequence.cu index 0fe2877f89f..4f650ce03cc 100644 --- a/paddle/cuda/src/hl_cuda_sequence.cu +++ b/paddle/cuda/src/hl_cuda_sequence.cu @@ -330,7 +330,7 @@ __global__ void KeSequenceAvgForward(real* dst, } sum = mode == 1 ? sum : (mode == 0 ? sum / seqLength : sum * my_rsqrt((real)seqLength)); - dst[gid] = sum; + dst[gid] += sum; } } -- GitLab