I am doing bayesian inference in Pyro. I have defined the model and the guide functions inside a class.
consider the following:
class bayesian_inf(object):
… some lines of code
def model(self,images,labels):
… some lines of code
def guide(self,images,labels):
…some lines of code
def do_inference(self):
… some lines of code
svi=SVI(self.model,self.guide,optimizer,loss)
… some lines of code
elbo=svi.step(images,labels)
My doubt is that does the svi.step function provide images and labels(ex: for each mini-batch of examples) to the model and guide function automatically behind the scenes? or do I need to send every mini batch of data to do_inference function