I’d like to estimate a model
y=f(g(h(x))) and update the parameters in an alternating fashion, i.e.
- in every even SVI step, I’d like to update the parameters of
- in every odd SVI step, I’d like to update the parameters of
h is always updated. One can assume that all
f,g,h are simple non-linear functions.
If I understand correctly, unlike in Pytorch, I cannot simply set
False for certain parameters in the Guide.
What I tried so far:
- First, I tried to use 2 different Guides, one for
h, fand one for
h, g. This does not make sense, because they do not share
- Second, I used an if statement in my guide and skipped the sample statements of
gevery other epoch, but somehow the parameters of
gare still updated. Is that to be expected?
Are there any other possible solutions (or a fix for 2)? I am also happy to provide a minimum working example.
Thanks in advance!