Split model and guide parameters in DMM for aggresive inference

Hi!

First, thanks for your attention :slight_smile:

Second, I would like to perform aggressive inference in the DMM. For that I need the parameters of the model separated from the guide. According to the DMM tutorial the parameters are saved all together by pytorch in the state_dict(). I am having some trouble finding how to separate the model and the guide’s parameters,

I hope I am making sense,

Thank you in advance!

Hi there!
I’m not sure about the specifics, but I seem to recall you can define custom optimizers that update only some of the parameters.
Alternately, the poutine.block function allows you to hide certain parameters (or “sites”) so they are not modified during inference.
Hopefully one of these two ideas can help

Hi gdalle!

Thanks so much for the clue :slight_smile: . I will investigate it :smiley:

All the best