diff --git a/paddle/operators/cos_sim_op.cu b/paddle/operators/cos_sim_op.cu index 42194d7a0576c32a37b4196d82fe0bfbcb3b29ee..86dc04995a27f1086b6592e2881fe4820252c880 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 a913e576f9702d5eed464be3bdf4cc2ecd56d1fc..7641ca15f144f54a0784a1ab8e1745f1fa4b3d9e 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);