Skip to content

Free unused memory-intensive variable in `optimize_kl`

Lukas Platz requested to merge optimize_kl_drop_unneeded_sl into NIFTy_8

In optimize_kl we currently keep around the sample list throughout the optimization loop, even while already drawing new samples. This substantially increases the peak memory footprint of optimize_kl for large parameter spaces and can be trivially alleviated by freeing the memory once the SL of the earlier iteration is no longer needed.

Merge request reports