dpf-nets icon indicating copy to clipboard operation
dpf-nets copied to clipboard

About the loss.

Open qinglew opened this issue 3 years ago • 0 comments

Thank you very much for releasing the code of DPF-Net. I read it carefully and have a doubt for the loss. Here are the details:

  1. In lib/networks/losses.py, the class PointFlowNLL is used to compute the negative log-likelihood loss for point cloud flow.

    return 0.5 * torch.add(
            torch.sum(sum(logvars) + ((samples[0] - mus[0]) ** 2 / torch.exp(logvars[0]))) / samples[0].shape[0],
            np.log(2.0 * np.pi) * samples[0].shape[1] * samples[0].shape[2]
    )
    

    Why need to / samples[0].shape[0] and why the np.log(2.0 * np.pi) need to multiply samples[0].shape[1] * samples[0].shape[2]? The same doubt lies in the class GaussianFlowNLL.

  2. In class GaussianEntropy, you wrote (1.0 + np.log(2.0 * np.pi). Why need to add 1.0 here?

qinglew avatar Dec 09 '21 03:12 qinglew