Skip to content

Commit

Permalink
Revert "fix softmaxce null point in shape test (#51850)" (#52086)
Browse files Browse the repository at this point in the history
This reverts commit 9c238d2.
  • Loading branch information
wanghuancoder authored Mar 27, 2023
1 parent 553630a commit d92c647
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions paddle/fluid/operators/softmax_with_cross_entropy_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit d92c647

Please sign in to comment.