From b59c9142d75d42a497b14b8beeed2b8f0ec7520d Mon Sep 17 00:00:00 2001 From: wanghuancoder Date: Fri, 24 Mar 2023 13:45:54 +0800 Subject: [PATCH] Revert "fix softmaxce null point in shape test (#51850)" This reverts commit 9c238d2bc27b87a5f946ecf1cdb4e9a7c090f53c. --- paddle/fluid/operators/softmax_with_cross_entropy_op.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/paddle/fluid/operators/softmax_with_cross_entropy_op.cc b/paddle/fluid/operators/softmax_with_cross_entropy_op.cc index c093078fae0..df142f3350c 100644 --- a/paddle/fluid/operators/softmax_with_cross_entropy_op.cc +++ b/paddle/fluid/operators/softmax_with_cross_entropy_op.cc @@ -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)) { -- GitLab