How to call when using mini batches?

I started without mini-batches and could do predictions with my pyro model by calling (after all steps)

to get the traces and by using TracePredictive and so on to get prediction samples. This worked out well.

Then i started to use mini-batched data which does not fit in memory anymore. Calling svi.step(batch) worked out but i can’t call anymore because data does not fit in memory. Any ideas how this could work?

Hi @martin.hahn, when using mini batches, the data is changed per step, so it is best to use svi.step. If you want to use full data but let SVI do subsampling, then you can use the methods in