Here is a snippet of my code:
TEXT = Field(lower=True,sequential=True, use_vocab=True, include_lengths = True)
LABEL = LabelField(sequential=False)
val_fields = [(‘title’,TEXT), (‘label’,LABEL)]
valid_data= TabularDataset.splits(path = ‘./’,
validation = ‘valid.csv’,
format = ‘csv’,
fields = val_fields,
skip_header=True)
valid_iterator = BucketIterator.splits(
(valid_data),
sort_key=lambda x: len(x.title),
sort_within_batch=False,
batch_size=1,
device=device)
for batch in valid_iterator:
print(batch.title[0])
print(batch.label[0])
printing the batch.title[0]  and batch.label[0] gives me a tensor but I want to know what is the text content and label while iterating this loop? I need this cause just wanted to visualize which are the data points which are misclassified during the prediction in eval mode