What is data_loader.get_batches doing?
Usually you would iterate over your data using:
for batch_idx, (data, target) in enumerate(data_loader):
     ....

Is it an own implementation or which version are your using?