Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output raw input sentences #31

Closed
sunyangfu opened this issue Oct 16, 2020 · 1 comment
Closed

Output raw input sentences #31

sunyangfu opened this issue Oct 16, 2020 · 1 comment

Comments

@sunyangfu
Copy link

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
Copy link
Author

I figured to use index to get the string out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant