bayesiains / nflows

Normalizing flows in PyTorch
MIT License
851 stars 119 forks source link

Using SimpleRealNVP on a 10 features converging to a different std #78

Closed yarinbar closed 1 year ago

yarinbar commented 1 year ago

Hi! We are using SimpleRealNVP and encountered a strange phenomenon. The flow converges to a seemingly normal distribution: image

However, when plotting the covariance matrix (that should be I) we get lower variances across the board: image

When dropping number of features we experience increased variance and when increasing the number of features to 512 the variance drops further and is significantly closer to 0.

We could not figure out what is causing this problem. Any help would be appreciated :D

arturbekasov commented 1 year ago

Hmm, not sure what's going on here. Your first plot suggests a variance of ~1 -- are you sure you're estimating the covariance matrix correctly? Unfortunately, we don't have the capacity to help with debugging: let us know if you can track it down to an issue with the package.