From 3ee00dde92f6fbe8c87b29466ba950f5d6aa7491 Mon Sep 17 00:00:00 2001 From: zhouzj <41366441+zzjjay@users.noreply.github.com> Date: Wed, 28 Dec 2022 17:28:08 +0800 Subject: [PATCH] adjust soft_test. (#1613) --- tests/test_soft_label_loss.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_soft_label_loss.py b/tests/test_soft_label_loss.py index 64544aa6..2e0bf8c8 100644 --- a/tests/test_soft_label_loss.py +++ b/tests/test_soft_label_loss.py @@ -54,9 +54,12 @@ class TestSoftLabelLoss(StaticCase): for block in paddle.static.default_main_program().blocks: for op in block.ops: loss_ops.append(op.type) + print(f"ret: {set(loss_ops).difference(set(merged_ops))}") self.assertTrue(set(merged_ops).difference(set(loss_ops)) == set()) - self.assertTrue({'cross_entropy', 'softmax', 'reduce_mean'}.issubset( - set(loss_ops).difference(set(merged_ops)))) + + self.assertTrue({ + 'softmax_with_cross_entropy', 'softmax', 'reduce_mean' + }.issubset(set(loss_ops).difference(set(merged_ops)))) if __name__ == '__main__': -- GitLab