I already read the tutorial about the torchtext.
I known how to use the Field handle text and target data.
Now I want to customized my data loader base on Field and Iterator object. In the torchtext.data.Field, the return type should be torch.tensor.
Is it possible to customize so that the output is string type?
Because some times, I need to check the data id for each mini-batch in my case.
For example, I have a data like blow.

I want to create a dataloader base on torch.data.TabularDataset so that the return is a list [id26305, id17569, id11008, id27763, id12958] when batch size is 5.
My code is here.
B560×515 12 KB
When I try display a mini-batch for data id, I get the error blow.
C728×803 24.7 KB
How to customized the data loader base on torchtext for this case?