From 64baee414423347a4006574bcb64f98d904f9f82 Mon Sep 17 00:00:00 2001 From: wangchaochaohu Date: Tue, 31 Dec 2019 16:44:00 +1400 Subject: [PATCH] polish code test=develop (#22014) --- paddle/fluid/operators/strided_slice_op.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/operators/strided_slice_op.cc b/paddle/fluid/operators/strided_slice_op.cc index c64e8beb254..dc86d5d4a71 100644 --- a/paddle/fluid/operators/strided_slice_op.cc +++ b/paddle/fluid/operators/strided_slice_op.cc @@ -72,16 +72,16 @@ class StridedSliceOp : public framework::OperatorWithKernel { ctx->HasInput("StridesTensor")) { tensor_input = true; } - if (ctx->HasInput("EndsTensor") == false) { + if (!ctx->HasInput("EndsTensor")) { PADDLE_ENFORCE_EQ(ends_size, axes.size(), "The size of ends must be equal to the size of axes."); } - if (ctx->HasInput("StartsTensor") == false) { + if (!ctx->HasInput("StartsTensor")) { PADDLE_ENFORCE_EQ( starts_size, axes.size(), "The size of starts must be equal to the size of axes."); } - if (ctx->HasInput("StridesTensor") == false) { + if (!ctx->HasInput("StridesTensor")) { PADDLE_ENFORCE_EQ( strides_size, axes.size(), "The size of strides must be equal to the size of axes."); -- GitLab