Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
In the current version of KLDivLoss, the return value is not the same value calculated by SoftmaxCrossEntropyLoss, which is not documented. It may due to the incorrect settings which using mean rather than sum dealing with the return value.
I have submitted a PR ( PR #18423 ) to fix such misbehave.
In addition, this PR also fix SDMLLoss which uses KLDivLoss's result.
Description
In the current version of
KLDivLoss
, the return value is not the same value calculated by SoftmaxCrossEntropyLoss, which is not documented. It may due to the incorrect settings which using mean rather than sum dealing with the return value.I have submitted a PR ( PR #18423 ) to fix such misbehave. In addition, this PR also fix
SDMLLoss
which usesKLDivLoss
's result.Error Message
(no error message)
To Reproduce
[1.4076059] <NDArray 1 @cpu(0)>
[0.46920195] <NDArray 1 @cpu(0)>
[1.4076059] <NDArray 1 @cpu(0)>
Environment
We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below: