未验证 提交 3ee00dde 编写于 作者: Z zhouzj 提交者: GitHub

adjust soft_test. (#1613)

上级 f68ec4b8
......@@ -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__':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册