podgorskiy / GPND

Generative Probabilistic Novelty Detection with Adversarial Autoencoders
129 stars 31 forks source link

is it an error for the line 297 in "novelty_detector.py" #6

Closed miaozhang0525 closed 4 years ago

miaozhang0525 commented 5 years ago

When you calculate logD = np.sum(np.log(np.abs(s))) # | \mathrm{det} S^{-1} | is that should be logD = -np.sum(np.log(np.abs(s))) # | \mathrm{det} S^{-1} |

Because you are calculating the inverse of the matrix.

HelloSeeing commented 5 years ago

It is because $J$ is the Jacobian of the encoder g rather than the generator f, and $$g \approx f^{-1}$$

miaozhang0525 commented 4 years ago

It is because $J$ is the Jacobian of the encoder g rather than the generator f, and $$g \approx f^{-1}$$

Hi, HelloSeeing,

Really thanks for your explanation. I got it!!