提交 3d159689 编写于 作者: C chenweihang

docs: fix some errors of description

上级 fd01a43a
...@@ -111,19 +111,19 @@ class UnsqueezeOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -111,19 +111,19 @@ class UnsqueezeOpMaker : public framework::OpProtoAndCheckerMaker {
AddOutput("Out", "(Tensor). The output tensor of unsqueeze operator."); AddOutput("Out", "(Tensor). The output tensor of unsqueeze operator.");
AddAttr<std::vector<int>>("axes", AddAttr<std::vector<int>>("axes",
"(std::vector<int>). List of integers," "(std::vector<int>). List of integers,"
" indicate the dimensions to be inserted") " indicating the dimensions to be inserted")
.AddCustomChecker([](const std::vector<int> &axes) { .AddCustomChecker([](const std::vector<int> &axes) {
PADDLE_ENFORCE(!axes.empty(), PADDLE_ENFORCE(!axes.empty(),
"Invalid axes, The unsqueeze axes is empty."); "Invalid axes, The unsqueeze axes is empty.");
// Validity Check: axes dims (<6). // Validity Check: axes dims (<6).
PADDLE_ENFORCE(static_cast<int>(axes.size()) < 6, PADDLE_ENFORCE(static_cast<int>(axes.size()) < 6,
"Invalid dimensions, dynamic dimensions should within " "Invalid dimensions, dynamic dimensions should be "
"[1, 6] dimensions (Eigen limit)."); "within [1, 6] dimensions (Eigen limit).");
// Validity Check: the range of unsqueeze aixs. // Validity Check: the range of unsqueeze aixs.
for (int axis : axes) { for (int axis : axes) {
PADDLE_ENFORCE(axis < 6, PADDLE_ENFORCE(axis < 6,
"Invalid dimensions, input axis should within " "Invalid dimensions, input axis should be"
"[1, 6] dimensions (Eigen limit)."); " within [1, 6] dimensions (Eigen limit).");
} }
}); });
AddAttr<bool>( AddAttr<bool>(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册