dpf-nets
dpf-nets copied to clipboard
About the loss.
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:
-
In
lib/networks/losses.py
, the classPointFlowNLL
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 thenp.log(2.0 * np.pi)
need to multiplysamples[0].shape[1] * samples[0].shape[2]
? The same doubt lies in the classGaussianFlowNLL
. -
In class
GaussianEntropy
, you wrote(1.0 + np.log(2.0 * np.pi)
. Why need to add1.0
here?