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

'Field' object has no attribute 'vocab' #33

Open
SevenMpp opened this issue Aug 2, 2021 · 0 comments
Open

'Field' object has no attribute 'vocab' #33

SevenMpp opened this issue Aug 2, 2021 · 0 comments

Comments

@SevenMpp
Copy link

SevenMpp commented Aug 2, 2021

Hello, excuse me, there was no problem during the training, but this error occurred during the prediction. I'm actually extracting predict as a function

PATH = './snapshot/best_steps_8600.pt'
args = confog_args()
text_field = data.Field(lower=True)
label_field = data.Field(sequential=False)
args.vocabulary_size = len(text_field.vocab)
args.cuda = args.device != -1 and torch.cuda.is_available()

In addition, the training data should also be loaded when predicting ?????

Looking forward to your reply. Thank you

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