refine CosSimDyFunctor

del_some_in_makelist
chengduoZH 7 years ago
parent de26ae416c
commit 8bd759007a

@ -57,8 +57,6 @@ struct CosSimDyFunctor<platform::CUDADeviceContext, T> {
}
};
template struct CosSimDyFunctor<platform::CUDADeviceContext, float>;
} // namespace operators
} // namespace paddle

@ -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);

Loading…
Cancel
Save