How can I find the bottleneck in the model / guide in svi.
Related to this is the control flow for svi. Using a logger / print statements, it seems the control flow is handled by the model, which goes to the guide when it hits a sample statements - then it goes to the guide and runs things in the guide until it gets a sample with of the named random variable. How exactly do things happen internally at the backend of pyro’s svi?
basically the guide is run forward and then the model is run forward. when the model is run forward any encountered sample sites are “replayed” from the guide samples