diff --git a/paddle/fluid/operators/unsqueeze_op.cc b/paddle/fluid/operators/unsqueeze_op.cc index da542aa852b04d99f25d804ea328fd539cc2152e..f2a15fdf572e0de30f9949dda5020e130b0c5585 100644 --- a/paddle/fluid/operators/unsqueeze_op.cc +++ b/paddle/fluid/operators/unsqueeze_op.cc @@ -111,19 +111,19 @@ class UnsqueezeOpMaker : public framework::OpProtoAndCheckerMaker { AddOutput("Out", "(Tensor). The output tensor of unsqueeze operator."); AddAttr>("axes", "(std::vector). List of integers," - " indicate the dimensions to be inserted") + " indicating the dimensions to be inserted") .AddCustomChecker([](const std::vector &axes) { PADDLE_ENFORCE(!axes.empty(), "Invalid axes, The unsqueeze axes is empty."); // Validity Check: axes dims (<6). PADDLE_ENFORCE(static_cast(axes.size()) < 6, - "Invalid dimensions, dynamic dimensions should within " - "[1, 6] dimensions (Eigen limit)."); + "Invalid dimensions, dynamic dimensions should be " + "within [1, 6] dimensions (Eigen limit)."); // Validity Check: the range of unsqueeze aixs. for (int axis : axes) { PADDLE_ENFORCE(axis < 6, - "Invalid dimensions, input axis should within " - "[1, 6] dimensions (Eigen limit)."); + "Invalid dimensions, input axis should be" + " within [1, 6] dimensions (Eigen limit)."); } }); AddAttr(