未验证 提交 182bf943 编写于 作者: B Bin Lu 提交者: GitHub

Update celoss.py

上级 8edec09d
......@@ -112,3 +112,4 @@ class KLDivLoss(paddle.nn.Layer):
p = paddle.nn.functional.softmax(p)
q = paddle.nn.functional.softmax(q)
return -(p * paddle.log(q + 1e-8)).sum(1).mean()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册