NVlabs / NVAE

The Official PyTorch Implementation of "NVAE: A Deep Hierarchical Variational Autoencoder" (NeurIPS 2020 spotlight paper)
https://arxiv.org/abs/2007.03898
Other
999 stars 163 forks source link

Saving and loading batch norm statistics for image sampling #18

Open a7b23 opened 3 years ago

a7b23 commented 3 years ago

For image sampling, 500 samples are generated every time to recompute the batch normalization statistics over the sampled images. This code here saves the recomputed statistics for the first time the code is run and then loads the statistics whenever sampling is run next. Thus the redundant 500 samples are not computed every time, and then sampling can be done fast.