未验证 提交 35c8eaf5 编写于 作者: L lidanqing 提交者: GitHub

[cherry-pick] correct the allowed dimension size (#30326) (#30433)

上级 2f16e0c6
......@@ -94,8 +94,10 @@ void eltwise_forward(const framework::ExecutionContext &ctx,
}
PADDLE_ENFORCE(
x->dims().size() == 2 || x->dims().size() == 3 || x->dims().size() == 4,
platform::errors::Unimplemented("Input dim must be with 2, 3 or 4"));
x->dims().size() >= 1 || x->dims().size() <= 6,
platform::errors::Unimplemented("Input dimension size can be 1, 2, 3, 4, "
"5, or 6, but now the dimension size is",
x->dims().size()));
auto src_tz = framework::vectorize<int64_t>(x->dims());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册