Infersent: Has `infersent.set_glove_path()` function been removed?

Created on 8 Aug 2018  路  3Comments  路  Source: facebookresearch/InferSent

Has infersent.set_glove_path() function been changed ?

infersent.set_glove_path("InferSent/dataset/GloVe/glove.840B.300d.txt")

Because I have the following error when running it:

AttributeError                            Traceback (most recent call last)
<ipython-input-18-1a6368709557> in <module>()
      1 infersent = torch.load('InferSent/encoder/infersent1.pkl', map_location=lambda storage, loc: storage)
----> 2 infersent.set_glove_path("InferSent/dataset/GloVe/glove.840B.300d.txt")
      3 

AttributeError: 'collections.OrderedDict' object has no attribute 'set_glove_path'

Most helpful comment

Hi,
I am getting an error in set_w2v_path .
W2V_PATH = 'dataset/fastText/crawl-300d-2M.vec'
infersent.set_w2v_path(W2V_PATH)

AttributeError: 'collections.OrderedDict' object has no attribute 'set_w2v_path'

could someone please help?

All 3 comments

Run into the same issue...

Hi,

Yes, we made some modifications to InferSent recently, and the set_glove_path is now named set_w2v_path because it can include fastText vectors. Please take a look at the new README.

Best,
Alexis

Hi,
I am getting an error in set_w2v_path .
W2V_PATH = 'dataset/fastText/crawl-300d-2M.vec'
infersent.set_w2v_path(W2V_PATH)

AttributeError: 'collections.OrderedDict' object has no attribute 'set_w2v_path'

could someone please help?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LeenaShekhar picture LeenaShekhar  路  3Comments

DrappierTechnologies picture DrappierTechnologies  路  7Comments

Priya22 picture Priya22  路  7Comments

dami23 picture dami23  路  9Comments

dougc333 picture dougc333  路  5Comments