What's the logic of this line code?HELP
RSMung opened this issue · 1 comments
RSMung commented
pytorch-fid/src/pytorch_fid/fid_score.py
Line 195 in 3d604a2
Why you want to check the elements in diagonal of covmean with 0?
As far as I'm concerned, we just need to save the real value with this code: covmean = covmean.real so that we don't need to check it.
Plz help me, thanks.
mseitzer commented
It checks that the square root of the product of covariances does not have a large imaginary component. If this is the case, something is wrong with the covariances (not positive definite) and you can not trust the results. This is why the check is necessary.