From 8bd759007a29aaece5e85b90362d8c886a8a7e5b Mon Sep 17 00:00:00 2001 From: chengduoZH Date: Thu, 28 Dec 2017 12:53:00 +0800 Subject: [PATCH] refine CosSimDyFunctor --- paddle/operators/cos_sim_op.cu | 2 -- paddle/operators/cos_sim_op.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/paddle/operators/cos_sim_op.cu b/paddle/operators/cos_sim_op.cu index 42194d7a05..86dc04995a 100644 --- a/paddle/operators/cos_sim_op.cu +++ b/paddle/operators/cos_sim_op.cu @@ -57,8 +57,6 @@ struct CosSimDyFunctor { } }; -template struct CosSimDyFunctor; - } // namespace operators } // namespace paddle diff --git a/paddle/operators/cos_sim_op.h b/paddle/operators/cos_sim_op.h index a913e576f9..7641ca15f1 100644 --- a/paddle/operators/cos_sim_op.h +++ b/paddle/operators/cos_sim_op.h @@ -56,7 +56,7 @@ struct CosSimFunctor { tep_x = x[i]; tep_y = y_[i]; xx += tep_x * tep_x; - yy += tep_y * tep_y; // only need + yy += tep_y * tep_y; xy += tep_x * tep_y; } xx = sqrt(xx); -- GitLab