Skip to content

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

@SevenMpp

Description

@SevenMpp

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions