but the above example is confusing. How does the demo_basic  code actually receive a batch? Is there an example with the actual data loader? @albanD

update
perhaps what I need is an example with a dataloader…seems this page has one: Distributed data parallel training in Pytorch 12