Output raw input sentences
Closed this issue · 1 comments
sunyangfu commented
Is there a easy way to get the original raw sentences instead of data objects during the test dataset evaluation?
def eval(data_iter, model, args):
model.eval()
corrects, avg_loss = 0, 0
for batch in data_iter:
feature, target = batch.text, batch.label
**print (feature.original_sentence)**
sunyangfu commented
I figured to use index to get the string out.