提交 b59c9142 编写于 作者: W wanghuancoder 提交者: GitHub

Revert "fix softmaxce null point in shape test (#51850)"

This reverts commit 9c238d2b.
上级 611f7ccc
......@@ -162,13 +162,6 @@ class SoftmaxWithCrossEntropyOp : public framework::OperatorWithKernel {
"R is the rank of Input(Logits)."));
axis = phi::funcs::CanonicalAxis(axis, logits_rank);
PADDLE_ENFORCE_EQ(logits_dims.size(),
labels_dims.size(),
platform::errors::InvalidArgument(
"Input(Logits) and Input(Label) should in "
"same dimensions size."));
for (int i = 0; i < logits_rank; i++) {
if (i != axis) {
if (ctx->IsRuntime() || (logits_dims[i] > 0 && labels_dims[i] > 0)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册