Forecaster module in Pyro


for x,y in dataloader:
forecaster = Forecaster(model, y, x, **forecaster_options)

if I train the model like this, inside a for loop, like above, does it train for every batch of data anew? Or is the forecaster trained in the first batch, and then it trains for the second batch, and goes on?
And how do I specify batch size here?
or Do I have to change the model so that It works for batch data? In the case of batch 1, it works fine though.