Https://www.analyticsvidhya.com/blog/2020/01/first-text-classification-in-pytorch/

Hi,
I am following the below link for Bi-LSTM implementation and get the following error:

Traceback (most recent call last):
File “/home/PycharmProjects/LSTM-Vid/venv/vocaubulary.py”, line 29, in
TEXT.build_vocab(train_data, min_freq=10, vectors = “glove.6B.100d”)
File “/usr/local/lib/python3.6/dist-packages/torchtext/data/field.py”, line 298, in build_vocab
for x in data:
File “/usr/local/lib/python3.6/dist-packages/torchtext/data/dataset.py”, line 154, in getattr
yield getattr(x, attr)
AttributeError: ‘Example’ object has no attribute ‘text’

Process finished with exit code 1

1 Like
© Copyright 2013-2020 Analytics Vidhya