From 5fe1fe3a27614555228eb45fe20dd2ce67f11c70 Mon Sep 17 00:00:00 2001 From: Siddharth Goyal Date: Wed, 25 Apr 2018 15:18:47 -0700 Subject: [PATCH] Fix signed/unsigned comparison warning (#10211) --- paddle/fluid/operators/softmax_mkldnn_op.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/operators/softmax_mkldnn_op.cc b/paddle/fluid/operators/softmax_mkldnn_op.cc index d00bd1447e6..71b541d98f6 100644 --- a/paddle/fluid/operators/softmax_mkldnn_op.cc +++ b/paddle/fluid/operators/softmax_mkldnn_op.cc @@ -77,7 +77,7 @@ class SoftmaxMKLDNNKernel : public paddle::framework::OpKernel { const bool is_test = ctx.Attr("is_test"); if (!is_test) { 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] < threshold ? threshold : output_data[i]; } -- GitLab