al314:

batch_size


You mean data_iter is still text now? At some point, I remember, it numericalizes text into tensor. data_iter should be ready to use to train model.
If not, you can use TEXT.vocab.stoi() to numericalize tokens as a list and convert to tensors torch.Tensor([tok_ids]).