How to save ADVI results in pymc v4


Following on questions from 2018: Saving ADVI results and reloading

How to do the same in pymc4?

1 Like


Does anyone know how to do that?

The old code from junpenglao answer looked like this

# save inference
bij = inference.approx.groups[0].bij
saveparam = { bij.rmap(param.eval())
	 for param in inference.approx.params}

But in pymc4 MeanField group (which is type of inference.approx.groups[0]) has no attribute bij