未验证 提交 5fe1fe3a 编写于 作者: S Siddharth Goyal 提交者: GitHub

Fix signed/unsigned comparison warning (#10211)

上级 3cd99f4b
...@@ -77,7 +77,7 @@ class SoftmaxMKLDNNKernel : public paddle::framework::OpKernel<T> { ...@@ -77,7 +77,7 @@ class SoftmaxMKLDNNKernel : public paddle::framework::OpKernel<T> {
const bool is_test = ctx.Attr<bool>("is_test"); const bool is_test = ctx.Attr<bool>("is_test");
if (!is_test) { if (!is_test) {
T threshold = exp(-64); T threshold = exp(-64);
for (size_t i = 0; i < dst_tz[0] * dst_tz[1]; ++i) { for (int i = 0; i < dst_tz[0] * dst_tz[1]; ++i) {
output_data[i] = output_data[i] =
output_data[i] < threshold ? threshold : output_data[i]; output_data[i] < threshold ? threshold : output_data[i];
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册