'Vocab' object has no attribute 'itos'

Viewed 1184

I am building ML models for NLP with pytorch, but as I define vocabulary for tekenized words in my text with "vacab" and try to use vocab.itos I get: 'Vocab' object has no attribute 'itos' error.

This is my vocab:

vocab = torchtext.vocab.vocab(counter, min_freq=1)

How can I solve this problem?

1 Answers
Related